Skip to content
  • 0 Votes
    2 Posts
    447 Views
    MesrineM

    I noticed that ed25519 do not need blake2b. A temporal solution was to remove the object "libsodium_la-blake2b-ref.o" from libsodium.a by using

    ar dv libsodium.a libsodium_la-blake2b-ref.o

    I can not remove "qcryptographichash.cpp.o" from libQt6Core.a because I use that on other libraries.

  • 0 Votes
    9 Posts
    775 Views
    mzimmersM

    This has been fixed in a development release of Creator 8.0.0 beta 2, and can be found here. Marking as solved. Thanks for the help.

  • 0 Votes
    13 Posts
    1k Views
    SGaistS

    Libraries that are shared between plugins and executable shall be shared and not static. Otherwise you will end up with multiple definition of the static meta object of your QObject based classes which is not good.

  • 0 Votes
    4 Posts
    653 Views
    JonBJ

    @learnist
    No, you can't change over something to do with instances to become static.

    You might create some static/global pointer for yourself and set it to point to a particular instance of a window or a widget or your textbox or something. Or, you might "walk" your windows to find what you are looking for, starting from, say, static QWidgetList QApplication::topLevelWidgets().

  • 0 Votes
    6 Posts
    2k Views
    S

    Okay, I could fix the issue. The problem was my statement for resetting the plot.
    I used the following:

    for( int g=0; g<3; g++ ) { ui->plot_acceleration->graph(g)->data().clear(); } ui->plot_acceleration->replot();

    Then I tried the following like it is mentioned here:

    pq_plot->graph(g)->data().data().clear();

    But then the error occurs:

    error: member reference type 'QCPDataContainer<QCPGraphData> *' is a pointer; did you mean to use '->'?

    Then I used the autocorrection of Qt creator ('->' instead of ' . ')

    for( int g=0; g<3; g++ ) { ui->plot_acceleration->graph(g)->data().data()->clear(); } ui->plot_acceleration->replot();

    And it is working now. Still don't know what exactly happens with the plot, when I use the first statement... When I use the first statement the plots are also gone after clicking on reset...

  • 0 Votes
    9 Posts
    2k Views
    Pl45m4P

    @SnuggleKat said in Difficulties connecting signals with slots (static members):

    Just didn't know signals mustn't be defined...

    If you mean "implemented" by "defined", then I wrote this in my first reply :)
    Yes, you dont implement signals. You just set the signal signature in your header file. After that, you can emit your signal to notify connected classes (-> slots)

  • 0 Votes
    5 Posts
    10k Views
    Linus JahnL

    Thanks for your replies.

    It probably doesn't matter at all, because the only result will be that the library is a few micro seconds faster at runtime / at load time.

    The reason is probably rather a psychological one than a real performance issue. -- I'd like to write clean code, use the ideal way and don't want to see warnings when running i.e. clazy on my code. When looking at performance there are probably other issues that have a greater impact on the performance.

    I actually tested it now:

    Test 1: Runtime usage #include <QString> const char *xmlns = "urn:ietf:xml:ns:xmpp-sasl"; // OR: const QString xmlns = QStringLiteral("urn:ietf:xml:ns:xmpp-sasl"); int main() { for (int i = 0; i < 1e9; i++) { // Option A: QString text(xmlns); // Option B: appending 'a' QString xmlnsPlusA = QString(xmlns) + 'a'; } } QStringLiteral char* A: QString( ), QStringLiteral is implicitly-shared 0.5 s 52 s B: appending 'a' 27 s 91 s

    -> The relative difference is high, but the absolute numbers are not relevant: You need to convert about 500 kB (about 20k comparable strings), so that this takes more than 1 ms and gets a performance problem in a GUI application.

    Test 2: Start-up time

    I also created a test binary with 10k global static constants (all with the same content):

    QString (cast from char *) QStringLiteral char * compile time 3 s 3.5 min < 1 s binary size (stripped) 410 kB 1270 kB 320 kB time to run (10k times) 33 s 23 s 19 s

    I guess the QStringLiteral binary takes longer to run, because it is larger and only partially, because of the non-POD CTORs.

    -> Using QStringLiteral has a slightly larger impact on the execution time than I've expected, but this is still not relevant since you usually have less than 10k global static strings and you only load the binary once instead of 10000 times. As long as you're not developing for an arduino this has probably no relevance.

    As expected the usage of QStringLiteral makes the binary a bit larger, the start-up time a little little bit larger, but is faster compared to casting from ascii everytime at runtime.

    I'll see if I can do anything with QArrayData, not because it's important, just for fun.

  • 0 Votes
    1 Posts
    568 Views
    No one has replied
  • 0 Votes
    22 Posts
    14k Views
    SGaistS

    @SherifOmran said in how to compile qt static with open ssl:

    PATH

    If you really need to change that variable, then do it only in the terminal you use to build your stuff. It's never a good idea to add the path to such sensitive libraries system wide as you might break unrelated applications.

  • 0 Votes
    14 Posts
    5k Views
    Ni.SumiN

    If it's solved, Please set it to "Solved" from unsolved.

  • 0 Votes
    4 Posts
    1k Views
    K

    @ed-wright

    Not sure, but probably you have to do a "nmake distclean" in between or it finds your license information. However, this is the opensource forum. You would need to approach the commercial, they have to able to give the proper answer.

  • 0 Votes
    19 Posts
    7k Views
    mrjjM

    Super good work.
    Thanks for updating on the way. will be helpful for others.

  • Qt 5.9.1 static build Linux

    Unsolved General and Desktop
    11
    0 Votes
    11 Posts
    14k Views
    A

    @SGaist you save me , thanks man

  • 0 Votes
    17 Posts
    9k Views
    M

    @koahnig

    SetName takes in a char* because it is a part of an API.

    @kshegunov

    Here are the relevant linker calls. I don't know how to get the .pro file from a VS project.

    Here is the linker call in the project that makes the dll:

    /OUT:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin\yyy3D.dll" /MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin\yyy3D.pdb" /DYNAMICBASE "sl_zed64.lib" "opencv_world310.lib" "cudart.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "qtmain.lib" "Qt5Core.lib" "Qt5Multimedia.lib" "Qt5Gui.lib" "winmm.lib" /IMPLIB:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin\yyy3D.lib" /DEBUG /DLL /MACHINE:X64 /OPT:REF /PGD:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin\yyy3D.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\3DRelease\yyy3D.dll.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64" /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0/lib/x64" /LIBPATH:"C:\Program Files (x86)\ZED SDK\dependencies\opencv_3.1.0/x64/vc14/lib" /LIBPATH:"C:\Program Files (x86)\ZED SDK\lib" /LIBPATH:"C:\Program Files\boost\boost_1_63_0/lib/x64" /LIBPATH:"C:\Qt\5.7\msvc2015_64\lib" /TLBID:1

    Here is the linker call for the project that uses the dll and has the run time error:

    /OUT:"E:\Users\misappsci\Documents\Projects\Aerie\host_x64\x64\Release\AerieLib.dll" /MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"E:\Users\misappsci\Documents\Projects\Aerie\host_x64\x64\Release\AerieLib.pdb" /DYNAMICBASE "Qt5Core.lib" "Qt5Gui.lib" "Qt5Multimedia.lib" "yyy3D.lib" "sl_zed64.lib" "opencv_world310.lib" "cudart.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /IMPLIB:"E:\Users\misappsci\Documents\Projects\Aerie\host_x64\x64\Release\AerieLib.lib" /DEBUG /DLL /MACHINE:X64 /OPT:REF /PGD:"E:\Users\misappsci\Documents\Projects\Aerie\host_x64\x64\Release\AerieLib.pgd" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Release\AerieLib.dll.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Qt\5.7\msvc2015_64\lib" /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0/lib/x64" /LIBPATH:"C:\Program Files (x86)\ZED SDK\dependencies\opencv_3.1.0/x64/vc14/lib" /LIBPATH:"C:\Program Files (x86)\ZED SDK\lib" /LIBPATH:"E:\Users\misappsci\Documents\Projects\yyy\x64\bin" /LIBPATH:"C:\Program Files\boost\boost_1_63_0/lib/x64/" /TLBID:1
  • 0 Votes
    2 Posts
    1k Views
    SGaistS

    Hi,

    I haven't done any static compilation of QCA but there's a QT_IS_STATIC in the src CMakeLists.txt. Might be worth playing with it.

    Hope it helps

  • 0 Votes
    2 Posts
    2k Views
    Paul ColbyP

    Hi @Michael-R-LegakoL-3com-com,

    I think a better approach, is to use a macro to apply the dllimport/export, and then enable that macro in the library only.

    For example, if you look at qmake's simple_dll test example, the simple.h header contains:

    #ifdef SIMPLEDLL_MAKEDLL # define SIMPLEDLL_EXPORT Q_DECL_EXPORT #else # define SIMPLEDLL_EXPORT Q_DECL_IMPORT #endif class SIMPLEDLL_EXPORT Simple { ... }

    Then the simple_dll.pro file contains:

    DEFINES += SIMPLEDLL_MAKEDLL

    So, this way, when the library is being built (via simple_dll.pro), then class is dllexport'ed. But when other code uses that same header (in doesn't define SIMPLEDLL_MAKEDLL) then that same class is dllimport'ed instead.

    Typically, you end up doing this sort of thing to many classes in a single library, so rather than having the #ifdef ... #define ... etc in each header file, it often ends up being written once in a "global" project header of some kind. For example, Q_CORE_EXPORT gets defined in qglobal.h, then used throughout all of the exported core Qt class headers.

    Also see:

    When creating a library with Qt/Windows and using it in an application, then there is a link error regarding symbols which are in the library

    Cheers.

  • 0 Votes
    6 Posts
    3k Views
    ammarmoezA

    @SGaist
    yes all opencv files is included in the path.
    After some research in log file, i think I have a problème with the génération of libopencv_imgcodecs310 and libopencv_imgproc310 files.

    I'll keep you posted.

  • 0 Votes
    9 Posts
    3k Views
    Z

    I think problem coused from dependent dev libraries...

    sudo apt-get build-dep qt5-default

    solved the problem..