Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. static linking
    Log in to post

    • UNSOLVED 5.12.0 static build error: "Project ERROR: Unknown module(s) in QT: multimedia multimediawidgets"
      General and Desktop • multimedia static linking 5.12.0 • • 4oh4  

      7
      0
      Votes
      7
      Posts
      879
      Views

      That error is usually happening with the shared version when an application has not been properly deployed. What do you mean shared? is that as opposed to the static build i've been trying to do? Sorry but I don't understand how your post is meant to help me. The application hasn't been 'deployed' (windeployqt? which i shouldn't need to do anyway because its meant to be static/standalone) yet because I'm still working on it in creator. The other plugins i need are now statically built / installed as was in an above response. The only thing that doesn't show up is the windows in "%QTDIR%\plugins\platforms" (I needed to add QT_QPA_PLATFORM_PLUGIN_PATH to windows environment variables) ive rebuilt the 5.12 static version multiple times now with other different configs to try to get it to work and the windows plugin simply never exists in plugins\platforms\
    • UNSOLVED Boot time optimization techniques
      Mobile and Embedded • loader static linking optimization boottime earlyboot • • Srinivasan  

      5
      0
      Votes
      5
      Posts
      649
      Views

      @JKSH Yes I did. On QT part, we followed a lot of techniques mentioned in that post. Using Loaders for lazy loading, optimizing images, using qtquickcompiler. The major challenge is on the OS boot time that we are working on.
    • UNSOLVED Runtime error: “must construct a QApplication before a QWidget” when launching a QDialog from a dll built with static Qt
      General and Desktop • qwidget dll static build qapplication static linking • • awyarbr  

      2
      0
      Votes
      2
      Posts
      770
      Views

      Hi and welcome to devnet, Do you have any static QWidget based class in your library/application ?
    • SOLVED Linking static library to an executable
      General and Desktop • qmake static library static linking executable • • enmaniac  

      11
      0
      Votes
      11
      Posts
      12147
      Views

      No problem. Good luck with your project!
    • UNSOLVED Building DLL in Visual Studio with Static Linking to QT
      Installation and Deployment • visual studio dll static static linking visual c++ • • mlathrop  

      17
      0
      Votes
      17
      Posts
      6329
      Views

      @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
    • UNSOLVED Building Qt as static libraries and linking on RedHat 7.2
      Mobile and Embedded • static library static linking • • Simon Platten  

      17
      0
      Votes
      17
      Posts
      4131
      Views

      @SGaist This is so new and fresh, I love it. I'll consider making a few pull requests in the near future. :)
    • SOLVED Build static linked app with Qt5 on Windows
      General and Desktop • static linking nmake c++ windows • • Redleouf  

      5
      0
      Votes
      5
      Posts
      3905
      Views

      Indeed it did the work, it is working fine now, thank you :)
    • UNSOLVED Does Qt package contains static libs?
      Installation and Deployment • qt 5.5.1 static linking windows 7 64 bi • • mastupristi  

      2
      0
      Votes
      2
      Posts
      1078
      Views

      Hi, welcome to the forum. This package does not contain static Qt libraries. The .a files are used to ease the dynamic linking. On Windows there are two ways to use dynamic libraries. The first one is by calling LoadLibrary (or using QLibrary that wraps it) at runtime. It's not convenient because you need to resolve all the symbols manually this way - lots of pointless work with a huge library like Qt. The other way (preferable and used here) is to link to a library that will load and resolve the shared library (dll) at runtime for you. The .a files you listed are just that. You link to them and you still need the dlls at runtime. As for how you use them: When you create a project in Qt Creator , in your .pro file you add the modules you need in the QT variable, for example: QT += core gui widgets network. After that you just run qmake (Build->Run qmake). This handles all the linking to the right .a files for you. To have a static build (without the dlls) of Qt you need to build it manually from source package. Be aware that there are licensing restrictions for the open-sourced version of Qt when linking statically.
    • SOLVED How to use static link library in a new program?
      General and Desktop • dll static linking • • MartinChan  

      3
      0
      Votes
      3
      Posts
      1090
      Views

      Thx,and it is really simple to use add library guide to add in the .dll and .lib that I want. And what I found is that maybe most of situations didn't have a .dll file for debug mode(which you can simply tell from it if has a -d suffix),but you can use the given ones in a release mode. thx again.
    • SOLVED Unable to link Qt application statically
      Installation and Deployment • qt5.5 arm static build plugins static linking • • zappy  

      9
      0
      Votes
      9
      Posts
      5256
      Views

      Okay... finally i solved it. Nothing to do with .pro file or PLUGIN macro. It was a basic PATH issue. qmake was searching for 'plugin' directory in /PREFIX path not in /SYSROOT/PREFIX path. I just copied all plugin directory from /SYSROOT/PREFIX to /PREFIX directory. I know this may not be the right way, but it temporarily solved my issue. If someone could suggest the correct solution please let me know.
    • SOLVED Unable to link Qt application statically
      Mobile and Embedded • qt5.5 cross compile arm plugins static linking • • zappy  

      6
      0
      Votes
      6
      Posts
      4012
      Views

      @zappy Hello. Have you looked at the bug report in the other thread you were following? Apparently there were some bug in the static building for Qt 5.5 and it's fixed in Qt 5.6.1 (https://bugreports.qt.io/browse/QTBUG-51071). So aside from upgrading, am at a loss ...
    • SOLVED How can I make a static build of Qt's libraries available to Creator?
      Tools • creator static library static linking • • ZeBe  

      4
      0
      Votes
      4
      Posts
      1065
      Views

      I'll try that, thanks for the help.
    • Strange Linker error LNK2019 MSVC2013-64 bits build dbg/rel with linkage to opencv 3.00 prebuilt library (.lib static 64-bits) on Win10/64bits
      General and Desktop • qmake debug msvc2013 static linking lib linker errors 64 bits lnk2019 opencv3.00 win10-64 • • sun_sina  

      4
      0
      Votes
      4
      Posts
      2999
      Views

      You can try to add your static libraries like this: LIBS += PATH_TO_LIB_DIR/libLIBNAME.lib
    • Qt Developping For Linux
      General and Desktop • qt5.5 static linking • • Lays147  

      2
      0
      Votes
      2
      Posts
      756
      Views

      Hi, You should build your application on the lowest version you want to support. [edit: fixed typo SGaist]
    • Link my Qt static library in to non Qt linux application
      General and Desktop • library static static library static linking 4.8 non-qt • • kumararajas  

      3
      0
      Votes
      3
      Posts
      1503
      Views

      But this time, I have a different error: /home/kumararajas/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: /home/kumararajas/Integrate_UI/G-CPU/lib/libuicorelib.a(uicontroller.o): undefined reference to symbol '__cxa_begin_catch@@CXXABI_1.3' /home/kumararajas/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: note: '__cxa_begin_catch@@CXXABI_1.3' is defined in DSO /home/kumararajas/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/libstdc++.so.6 so try adding it to the linker command line /home/kumararajas/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/libstdc++.so.6: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[4]: *** [bin/FireApp] Error 1 make[3]: *** [libraries] Error 2 make[2]: *** [libraries] Error 2 make[1]: *** [libraries] Error 2 This looks like standard library compatibility issue. Any thoughts on this?
    • Static linking of QT standard library
      QML and Qt Quick • static linking qt5core.dll not • • tushar ramojwar  

      4
      0
      Votes
      4
      Posts
      1353
      Views

      Basically no, there is always some type of license for Qt libs in place. Either you use LPGL for no cost or a commercial license. However, this is the same as with any other SW around. Please check out the different options for licenses.