Results 1 to 5 of 5

Thread: Building QT Staticly - QT 4.7.0 + WinXP + MinGW

  1. #1
    Join Date
    Feb 2008
    Posts
    43
    Thanks
    14

    Default Building QT Staticly - QT 4.7.0 + WinXP + MinGW

    Hello! I have spent about a week trying to find out correct options to build my QT staticly. I made a nice program that is ready for distribution and I would like to make everyting in one file so I just give this one file to people and it will run on their Windows with no any other files needed. I managed to do such things in past with my previous programs on previous QT versions but this time I got stuck for a while.

    The QT version is 4.7.0 (x32). First I got error on builidng uic and found on the Forum to use "-no-qt3support" option. That helped. But now I'm getting an error on my program compilation

    Qt Code:
    1. c:\Qt\2010.04\qt\lib/libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x8e0f): undefined reference to `_imp___Z21qt_call_post_routinesv'
    2. c:\Qt\2010.04\qt\lib/libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x9443): undefined reference to `_imp___Z21qt_call_post_routinesv'
    3. c:\Qt\2010.04\qt\lib/libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x9a6b): undefined reference to `_imp___Z21qt_call_post_routinesv'
    4. c:\Qt\2010.04\qt\lib/libQtGui.a(qwhatsthis.o):qwhatsthis.cpp:(.text+0xfc): undefined reference to `_imp___Z21qDeleteInEventHandlerP7QObject'
    To copy to clipboard, switch view to plain text mode 
    I have also tried "-no-webkit" option but it didn't help.

    So the last thing I did:

    Qt Code:
    1. configure -static -no-qt3support
    To copy to clipboard, switch view to plain text mode 
    (20-30 minutes compilations)

    Qt Code:
    1. mingw32-make sub-src
    To copy to clipboard, switch view to plain text mode 
    (another 5-7 hours)

    No errors, but can't compile the program giving the above errors during the program compilation state. Please help.

  2. #2
    Join Date
    Jan 2010
    Posts
    13
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Building QT Staticly - QT 4.7.0 + WinXP + MinGW

    Do you get any build issues? Any pieces of code highlighted?
    I'm a beginner too but it sounds like the source file qapplication.cpp has something that isn't included in the header file.
    Ubuntu: Eclipse Galileo with CDT and QT integration plug-in.

    Try, try and try again. Abort. Continue. Fail?

  3. #3
    Join Date
    Feb 2008
    Posts
    43
    Thanks
    14

    Default Re: Building QT Staticly - QT 4.7.0 + WinXP + MinGW

    Thank you for the idea. I have just checked that but nothing highlighted and it seems a valid function, I also checked my code and included everything possible in the header file but it didn't help...

  4. #4
    Join Date
    Feb 2008
    Posts
    43
    Thanks
    14

    Default Re: Building QT Staticly - QT 4.7.0 + WinXP + MinGW

    I have read some more posts on this subject and now done the following:

    in qapplication.cpp and qwhatsthis.cpp I changed "Q_DECL_IMPORT extern" with "Q_CORE_EXPORT" which helped to get rid of the error.

    Then I did
    Qt Code:
    1. mingw32-make distclean
    2. configure -static -no-qt3support -no-webkit -no-phonon -no-s60
    3. mingq32-make sub-src
    To copy to clipboard, switch view to plain text mode 
    It went fine all the way through and then I was able to compile my application but... it is not static! It asks for mingwm10.dll, libcc_s_dw2-1.dll etc. if ran on a diffent computer. I'm sure someone has a clue on what is going on here!

  5. #5
    Join Date
    Jun 2010
    Location
    Salatiga, Indonesia
    Posts
    160
    Thanks
    11
    Thanked 32 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Re: Building QT Staticly - QT 4.7.0 + WinXP + MinGW

    Quote Originally Posted by slava View Post
    It went fine all the way through and then I was able to compile my application but... it is not static! It asks for mingwm10.dll, libcc_s_dw2-1.dll etc. if ran on a diffent computer. I'm sure someone has a clue on what is going on here!
    Maybe, this would help.

Similar Threads

  1. Building PythonQt with MinGW
    By givemeaname in forum Qt Programming
    Replies: 6
    Last Post: 9th March 2010, 08:20
  2. Replies: 0
    Last Post: 18th February 2009, 19:17
  3. Replies: 6
    Last Post: 25th July 2008, 21:22
  4. WinXP + MinGW http example doesn'work through ssl
    By pccrusher in forum Installation and Deployment
    Replies: 4
    Last Post: 18th February 2008, 22:29
  5. Build Qt4.3.2 from sources with MinGW under WinXP
    By Nyphel in forum Installation and Deployment
    Replies: 9
    Last Post: 30th October 2007, 18:05

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.