Results 1 to 6 of 6

Thread: Error while statically compiling qt

  1. #1
    Join Date
    Dec 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Error while statically compiling qt

    I was compiling qt as described here
    http://developer.qt.nokia.com/wiki/H...ndows_with_gcc

    But when i do call mingw32-make.exe,
    i get this error after a couple of hours..
    Any help would be appreciated

    g++ -static -static-libgcc -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o ..\..\bin\qmlviewer.exe object_script.qmlviewer.Debug -L"c:\Qt\2010.05\qt-static\lib" -L"c:\Qt\20
    10.05\qt-static\lib" -lmingw32 -lqtmaind -lQtDeclaratived -lQtScriptd -lQtSvgd -lQtSqld -lQtOpenGLd -lQtNetworkd -lglu32 -lopengl32 -lQtGuid -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCored -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 c:\Qt\2010.05\qt-static\lib\libQtDeclaratived.a(qdeclarativevaluety pe.o):C:\Qt\2010.05\qt-static\src\declarative/qml/qdeclarativevaluetype.cpp:916: undefined reference to `_imp___Z13qt_defaultDpiv'
    c:\Qt\2010.05\qt-static\lib\libQtDeclaratived.a(qdeclarativevaluety pe.o):C:\Qt\2010.05\qt-static\src\declarative/qml/qdeclarativevaluetype.cpp:941: undefined reference to `_imp___Z13qt_defaultDpiv'
    collect2: ld returned 1 exit status
    mingw32-make.exe[3]: *** [..\..\bin\qmlviewer.exe] Error 1
    mingw32-make.exe[3]: Leaving directory `C:/Qt/2010.05/qt-static/tools/qml'
    mingw32-make.exe[2]: *** [debug-all] Error 2
    mingw32-make.exe[2]: Leaving directory `C:/Qt/2010.05/qt-static/tools/qml'
    mingw32-make.exe[1]: *** [sub-qml-make_default-ordered] Error 2
    mingw32-make.exe[1]: Leaving directory `C:/Qt/2010.05/qt-static/tools'
    mingw32-make.exe: *** [sub-tools-make_default-ordered] Error 2

  2. #2
    Join Date
    Sep 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error while statically compiling qt

    I have the same problem, and it would be great if someone has a clue as how to fix it.

  3. #3
    Join Date
    Jul 2009
    Posts
    74
    Thanks
    2
    Thanked 6 Times in 6 Posts

    Default Re: Error while statically compiling qt

    i wrote this tutorial
    http://www.qtcentre.org/threads/3714...%29?highlight=

    maybe it helps you

  4. #4
    Join Date
    Jan 2011
    Location
    Gordion
    Posts
    52
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error while statically compiling qt

    @javimoya : can i make a stand alone application with your tutorial ???

    I tried before tutorial at, http://www.qtcentre.org/wiki/index.p..._Qt_on_Windows ... but when my application deployed, i cant show my icons again. Before static compile everythings goes well. After static compile, my icons has lost and my system calls (like stdout of a process) doesnt work.

    Is your tutorial can help me ???

    Thanks a lot.

  5. #5
    Join Date
    Jan 2011
    Location
    Gordion
    Posts
    52
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error while statically compiling qt

    Hi again. I solved my problems.

    First, i can't do your tutor. Because its taking more time.

    Second: i deleted all confs, all Qt, mingw and the others from my computer and i installed Qt SDK again. I made a release (not debug) for my app... And then, on my virtual machine i run it. Its give more errors I copied dll files, what the application wants. So at last i copied 7 file in my application work dir, and its run exactly.

    After thas i packed it with Nsis.

    Third: i can't stop... Because my installer package has a 40mb, and i refuse it... I build Qt for staticly again, i do it like trolls document. (yes, i know my english is bad... sorry about this... i'm working on it ) so, i find the wrong thing that i'm always doing...

    After static config&build, i didnt check release from project properties!!!

    It's important... I'm build it static but i waiting for dynamic working... I find my fault, and change it for release, and bingo!! it's runned...
    So, my application size has down too... Its fall to 5 mb, from 40mb ... Its amazing...

    Thanks a lot...

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error while statically compiling qt

    Don't forget the different licensing requirements of static builds.

Similar Threads

  1. LNK2005 error in VS2005 when statically building Qt App
    By pkloc in forum General Programming
    Replies: 9
    Last Post: 2nd July 2011, 01:36
  2. error while compiling on MAC
    By aj2903 in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2010, 07:03
  3. Replies: 3
    Last Post: 2nd March 2010, 17:52
  4. Error in compiling OpenSSL & Qt statically
    By KGCode in forum Installation and Deployment
    Replies: 2
    Last Post: 14th October 2009, 15:12
  5. Replies: 1
    Last Post: 25th October 2008, 19:18

Tags for this Thread

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.