Results 1 to 4 of 4

Thread: Qt 5.0.2 static buliding error

  1. #1
    Join Date
    Apr 2013
    Posts
    24
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Qt 5.0.2 static buliding error

    Hi,

    My environment is:

    win7 64bit sp1
    src code: qt-everywhere-opensource-src-5.0.2.zip

    Qt Code:
    1. Path = D:\Program Files\python3.3.2\;D:\Perl64\site\bin;D:\Perl64\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;%ANT_HOME%\bin;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;D:\Program Files\MySQL\MySQL Server 5.5\bin;%JBOSS_HOME%\bin;D:\Program Files\TortoiseSVN\bin;%M2_HOME%\bin;D:\Qt\Qt5.0.1\Tools\MinGW\bin;D:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin;D:\Qt\qwt-6.1-rc3\setup\lib;C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\
    To copy to clipboard, switch view to plain text mode 

    I had alreadly installed qt sdk (binary) at D:\Qt\Qt5.0.1\ , therefore, I used the default mingw in Qt5.0.1\mingw47_32 to complie the source code.

    Qt Code:
    1. my configure cmd is:
    2.  
    3. configure.bat -confirm-license -opensource -platform win32-g++ -release -static -ltcg -c++11 -fast -prefix "D:\Qt\Qt5.0.2-rel-static" -accessibility -rtti -qt-sql-sqlite -qt-sql-odbc -plugin-sql-sqlite -plugin-sql-odbc -qt-zlib -qt-libpng -qt-libjpeg -audio-backend -nomake docs -opengl desktop -no-qml-debug -no-vcproj -no-dbus -nomake tests -nomake examples -nomake demos -qt-freetype
    4.  
    5. mingw32-make
    To copy to clipboard, switch view to plain text mode 


    error is:

    Qt Code:
    1. F:/qt-everywhere-opensource-src-5.0.2/qtbase/plugins/platforms\libqwindows.a(qwindowswindow.o):qwindowswindow.cpp:(.text+0x1569): undefined reference to `QPlatformWindow::formatWindowTitle(QString const&, QString const&)'collect2.exe: error: ld returned 1 exit status
    2. Makefile.Release:79: recipe for target 'F:\qt-everywhere-opensource-src-5.0.2\qtbase\bin\qmlscene.exe' failed
    3. mingw32-make[4]: *** [F:\qt-everywhere-opensource-src-5.0.2\qtbase\bin\qmlscene.exe] Error 1
    4. mingw32-make[4]: Leaving directory 'f:/qt-everywhere-opensource-src-5.0.2/qtdeclarative/tools/qmlscene'
    5. Makefile:34: recipe for target 'release' failed
    6. mingw32-make[3]: *** [release] Error 2
    7. mingw32-make[3]: Leaving directory 'f:/qt-everywhere-opensource-src-5.0.2/qtdeclarative/tools/qmlscene'
    8. Makefile:44: recipe for target 'sub-qmlscene-make_first' failed
    9. mingw32-make[2]: *** [sub-qmlscene-make_first] Error 2
    10. mingw32-make[2]: Leaving directory 'f:/qt-everywhere-opensource-src-5.0.2/qtdeclarative/tools'
    11. Makefile:66: recipe for target 'sub-tools-make_first' failed
    12. mingw32-make[1]: *** [sub-tools-make_first] Error 2
    13. mingw32-make[1]: Leaving directory 'f:/qt-everywhere-opensource-src-5.0.2/qtdeclarative'
    14. makefile:154: recipe for target 'module-qtdeclarative-make_first' failed
    15. mingw32-make: *** [module-qtdeclarative-make_first] Error 2
    To copy to clipboard, switch view to plain text mode 

    I had blocked here for whole day, pls help me.

    Thank you in advance.

    Tang Tao

  2. #2
    Join Date
    Jun 2013
    Posts
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5.0.2 static buliding error

    Maybe it's not exactly answer to your question, becouse it is for compiling with msvc, not with MinGW, but it worked for me.

    I had the same error when compiling with MinGW. After a whole day compiling with MinGW i switched to msvc and after some amount of time i compiled it succesfully. I managed to compile QT versions 4.7.0, 5.0.2 (downloaded from git) and 5.1 beta.

    I followed strictly to this guide (note that starting with QT5 versions make configurations were moved to \qtbase folder):
    http://blog.diplix.de/2011/08/23/qt-...tatic-linking/

    Also when installing Visial Studio i put it in folder name without spaces (don't know if that was reason for not working earlier, becouse it wasn't the only thing that i changed in first succesful build, but it's not a bad idea).
    The path was then:
    Qt Code:
    1. C:\msvc10.0\VC\bin
    To copy to clipboard, switch view to plain text mode 

    So my configure options were
    Qt Code:
    1. configure -static -debug-and-release -opensource -qt-sql-sqlite -platform win32-msvc2010 -nomake demos -nomake examples -nomake tests -opengl desktop
    To copy to clipboard, switch view to plain text mode 

    After installing everything and changing build configurations in Qt Creator i managed to compile statically all Qt libraries in one executable file but not Visual C++ runtime libraries ("could not find msvcr100.dll" error after launching app on different computer), despite building Qt statically with "-MT" option configuration in qmake.conf.
    All then i had to do was adding following line in .pro file to include this library:
    Qt Code:
    1. INCLUDEPATH += C:\msvc10.0\Common7\Packages\Debugger\X64\msvcr100.dll
    To copy to clipboard, switch view to plain text mode 

    After that i can run app on different computer.

    Hope that helps

  3. The following user says thank you to arekp for this useful post:

    tangtao_xp (3rd June 2013)

  4. #3
    Join Date
    Apr 2013
    Posts
    24
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.0.2 static buliding error

    Hi, arekp

    Thank you for your friendly help.

    Actually, I passed the static compiling in another way:

    - I do not use the standalone source code package published by Qt official website. I used the source code that carried with the 5.0.2 binary setup package.(select the full installation, source code will be in, for example, D:\Qt\Qt5.0.2\5.0.2\Src)

    - I found that the code from the binary package is very easy to compile, and doesn't like the standalone code has so many strange error when compiling.

    -----------------------------------------------------------

    another question I had found in binary package code compiling: it does not provide qml2(qt quick 2) moudle.
    pls refer to https://bugreports.qt-project.org/browse/QTBUG-28357

    Does anyone got the problem soloved?


    Thank you in advance.


    Tang Tao

  5. #4
    Join Date
    Jun 2013
    Posts
    1
    Qt products
    Qt5

    Default Re: Qt 5.0.2 static buliding error

    May be some video tutorials for this could help to learn us more easily...If possible do share some blog or articles or the site which can be referred for learning purposes.
    Shane Morris
    Malhotra Law Firm, PLLC
    Fernwell Building 505 West Riverside Avenue, Ste. #500
    Spokane, WA 99201
    software patents

Similar Threads

  1. Replies: 2
    Last Post: 20th September 2012, 23:30
  2. Replies: 2
    Last Post: 8th May 2011, 23:27
  3. Error in static compilation of Qt 2010.05!
    By elton.lika in forum Newbie
    Replies: 5
    Last Post: 26th January 2011, 22:37
  4. Error when compiling for static version in windows
    By que in forum Installation and Deployment
    Replies: 4
    Last Post: 28th October 2008, 21:41
  5. QHash static member error
    By ramazangirgin in forum Qt Programming
    Replies: 7
    Last Post: 5th February 2008, 12:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.