[SOLVED] Static building for x64 - Where is the platform set & two other questions



  • Hey there,

    after a long night I finally built the static libraries from Qt 5.2.0. But: I had to use the win32-msvc2012 platformset.

    How can I build the win64 versions of them? There is no win64 platform set, except winrt-x64-msvc2012, but this led to some errors (I am compiling on Windows 7 x64). Do I have to switch something when calling configure or nmake? I tried using the x64-VS-commandline and set "-D x86_64" as a additional parametre at configure (I dont know if that is the right way, just saw this in the qmake.conf), but this leads to an linker error.

    Besides that, there a two other questions:

    1. How can I specify the output path for the library files?
    2. After the compilation, the whole installation occupied more than 20 GB.. are there any caches I can delete, and do I need the lonely*.obj-files in the subdirs from \qtbase? The *.lib-files are stored directly in \qtbase\lib..

    €dit: The examples folder grow up to 25.3 GB.. but when I got the libaries, I dont need the example files, right? I wonder anyway why this folder got compiled..

    Greetings,

    VVCephei


  • Lifetime Qt Champion

    Hi,

    You should only need to start the build from the x64 command line, nothing special is required.

    The size of the build dir is normal, you are probably building in debug-and-release mode, which gives you two sets of static Qt libraries and debug versions are pretty big. As for the demos and examples, if you don't specify -nomake demos -nomake examples, they will be built and static applications/libraries will be bigger since every application will contain a copy of the needed elements from each library it uses (and are also probably built both in debug and release mode).

    1. -prefix and use jom install at the end of the build
    2. once installed you can delete the build folder.

    More information "here":http://qt-project.org/doc/qt-5.0/qtdoc/install-win.html

    Hope it helps



  • Hello SGaist,

    it seems to work, but I am not sure. After installing the files with jom, I added the files to my project:

    @
    LIBS += -LC:\Qt5.2\5.2.0\Src\qtbase\bin\qt_static_release\qt_static_release\lib\ -lQt5Core
    -LC:\Qt5.2\5.2.0\Src\qtbase\bin\qt_static_release\qt_static_release\lib\ -lQt5Gui
    -LC:\Qt5.2\5.2.0\Src\qtbase\bin\qt_static_release\qt_static_release\lib\ -lQt5Widgets \

    INCLUDEPATH += C:\Qt5.2\5.2.0\Src\qtbase\bin\qt_static_release\qt_static_release\include
    @

    Well, it compiles and creates a bigger application than before (yeah, static linking!), but now I am experiencing another problem: I cant run it, even within QtCreator. I get this "failed to find or load the Qt platform plugin windows".

    I googled this issue and found some ways to solve it, for example copy libEGL.dll or create a folder structure with \platforms\qwindows.dll, but the error remains.

    I built the static libraries with enabled ANGLE, do you know if this may cause problems?


  • Lifetime Qt Champion

    Did you update your code adding

    @
    #include <QtPlugin>
    Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);
    @

    and link to the following libs:

    • Qt5PlatformSupport.lib
    • qwindows.lib

    ?



  • Nope, I did not. Now working as intended!

    Thank you, I'll mark this topic as solved.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.