Results 1 to 10 of 10

Thread: Compiling static application

  1. #1
    Join Date
    Dec 2007
    Posts
    36
    Thanks
    2
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Compiling static application

    Hi all,

    I am compiling my GUI application as a library which I then link to my main C application. I am wondering if it is possible to compile this GUI library as static.

    Part of my .pro file looks like this:

    TEMPLATE = lib
    TARGET =
    DEPENDPATH += .
    INCLUDEPATH += . ../../include/
    CONFIG += qt staticlib
    QT -= network
    DEFINES += QT_THREAD_SUPPORT QT_DLL

    Tnx,
    Benjamin

  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: Compiling static application

    So, what is the problem? And are we talking Qt3 or Qt4 here? Your profile suggests you are using Qt3 but the snippet you posted seems to be from Qt4...

  3. #3
    Join Date
    Dec 2007
    Posts
    36
    Thanks
    2
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Compiling static application

    I am using qtopia 4.4.3 and Qt4

  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: Compiling static application

    You still didn't say what the problem is.

  5. #5
    Join Date
    Dec 2007
    Posts
    36
    Thanks
    2
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Compiling static application

    What I am trying is to link application statically not dynamically. I would like to make my app to load all the necessary libraries on start up . Because once I start my app I can no longer access the flash from which I load the app.

  6. #6
    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: Compiling static application

    That I understand. What I don't understand is what doesn't work for you using the project file you posted.

  7. #7
    Join Date
    Dec 2007
    Posts
    36
    Thanks
    2
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Compiling static application

    I think that I found out what is the problem. I need to recompile my qtopia libraries statically in order for this pro file to generate statical GUI library.

    I read this article http://wiki.qtcentre.org/index.php?t...c_applications

    Tnx,

  8. #8
    Join Date
    Dec 2007
    Posts
    36
    Thanks
    2
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Compiling static application

    When I rebuild my GUI lib against these new statically linked libraries my library file is almost the same size.

    Any ideas?

  9. #9
    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: Compiling static application

    Did you expect it to be smaller or larger?

  10. #10
    Join Date
    Dec 2007
    Posts
    36
    Thanks
    2
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Compiling static application

    When I try to compile some examples from new statical compiled qtopia I get the following error:


    warning: warning: feholdexcept is not implemented and will always fail
    /home/benjamin/Desktop/Install/qtopia/qtopia-core-commercial-src-4.3.3/lib/libQtCore.a(qlocale.o)(.text+0x75b4):qlocale.cpp: warning: warning: fesetenv is not implemented and will always fail

    Any idea?

Similar Threads

  1. Compiling QCA as static library
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 7th December 2008, 17:32
  2. Error when compiling for static version in windows
    By que in forum Installation and Deployment
    Replies: 4
    Last Post: 28th October 2008, 20:41
  3. Static application MSVC 2005 no image
    By bitChanger in forum Installation and Deployment
    Replies: 2
    Last Post: 26th August 2008, 13:06
  4. Replies: 16
    Last Post: 23rd May 2008, 10:12
  5. 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

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.