Results 1 to 4 of 4

Thread: I Can't use QtCreator to static build my application

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

    Default I Can't use QtCreator to static build my application

    I develop my application on IDE(QtCreator), it is so easy, but I don't know how does static build, any body tell me, thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: I Can't use QtCreator to static build my application

    You need to have Qt built statically. Consult our wiki if you have problems with it.

  3. #3
    Join Date
    Dec 2008
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: I Can't use QtCreator to static build my application

    ok,thanks, I do this:
    1. I download another qt4.4.3 opensource and install to E:\QtSrc\4.4.3
    2. build qt to static
    cd E:\QtSrc\4.4.3
    configure.exe -static
    nmake sub-src
    3. modify my application pro file
    myapp.pro add:
    QMAKE_LFLAGS += -static
    4. nmake clean
    5. qmake -config release
    6. nmake

    and then appear two warn:
    LINK : warning LNK4044: unrecognized option "static"; ignored
    LINK: warning LNK4089: all references to "WINSPOOL.DRV" discarded by /OPT:REF

    ok, I get my app.exe but I don't display QMovie gif, and font is not my font, I copy plugs\imageformats to myapp\imageformats, it's not display again...
    Last edited by kyosold; 6th January 2009 at 09:34.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: I Can't use QtCreator to static build my application

    QMAKE_LFLAGS+=-static is for unices, not windows.

    static build of Qt doesn't use plugins, so you need them built statically as well, linked against the application and imported into the application using Q_IMPORT_PLUGIN.

Similar Threads

  1. Static application MSVC 2005 no image
    By bitChanger in forum Installation and Deployment
    Replies: 2
    Last Post: 26th August 2008, 13:06
  2. Replies: 16
    Last Post: 23rd May 2008, 10:12
  3. Please Help-->have few doubts with Static build in Windows !
    By Krish in forum Installation and Deployment
    Replies: 1
    Last Post: 17th March 2008, 14:37
  4. how to build static application with MinGw?
    By mismael85 in forum Installation and Deployment
    Replies: 9
    Last Post: 11th March 2008, 20:45
  5. problem after Qt 4.2.2 static build
    By npc in forum Newbie
    Replies: 2
    Last Post: 23rd February 2007, 12:28

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.