Results 1 to 5 of 5

Thread: static linking options

  1. #1
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default static linking options

    Hello,

    When installing Qt 4.2, it is possible to build statically by typing
    ./configure -static

    I understand that I should build the database drivers, for instance with -qt-sql<psql>
    At this point, I can be sure 100% that an app deployed with no extra postgresql library will run properly. Just checking in case I missed something here.

    I also need to build some image support.
    -qt-libmng will do the trick and I will not have to bundle any png library and the machine where the app is deployed will not need to have the png library. Once again, I am checking to make sure I got it right.
    -system-libpng will use the library of the OS; I am assuming the library of the machine where compilation occurs; which means that I should be careful to ship that library, just in case.

    Thanks

  2. #2
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: static linking options

    I followed the wiki's instructions to build statically
    configure - static works fine

    but

    configure -release -static -qt-zlib -qt-gif -qt-libpng -qt-libjpeg -qt-libmng -no-qt3support -qt-sql-psql -I C:\psql\8.1\include -l C:\psql\8.1\lib\ms\libpq.lib

    returns an error
    "qmake.exe has encountered a problem and needs to close..."
    QMake failed, return code -1073741819
    Any idea of what I am doing wrong?
    Thanks

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: static linking options

    Quote Originally Posted by jcr View Post
    configure ... -l C:\psql\8.1\lib\ms\libpq.lib
    Try: configure ... -L C:\psql\8.1\lib\ms\

  4. The following user says thank you to jacek for this useful post:

    jcr (7th October 2006)

  5. #4
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: static linking options

    Jacek, I don't know how many issues you have solved for me... thank you very much to you and to everybody else qtcenter for that matter.

  6. #5
    Join Date
    Jan 2006
    Posts
    73
    Thanks
    16
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: static linking options

    Well, another problem popped up here. I am compiling for mingw and I changed the qmake.conf files as suggested on wiki,
    then typed the above configure
    goes fine... I then type mingw32-make
    and I get the error:
    g++: OBJECTS_DIR: no such file or directory
    g++: =: No such file or directory
    g++: tmp\obj\release_static: No such file or directory
    mingw32-make[3]: ***[..\..\..\bin\rcc.exe] Error1
    mingw32-make[3]: Leaving directory 'C:/Qt/4.2.0/src/tools/rcc'
    mingw32-make[2]: *** [release] Error 2
    mingw32-make[2]: Leaving directory 'C:/Qt/4.2.0/src/tools/rcc'
    mingw32-make[1]: *** [sub-tools_rcc-make_default] Error 2
    mingw32-make[1]: Leaving directory 'C:/Qt/4.2.0/src'
    mingw32-make: *** [sub-src-make_default-ordered] Error 2

    I am a bit lost here...

Similar Threads

  1. static & dynamic linking
    By mickey in forum General Programming
    Replies: 6
    Last Post: 11th June 2010, 08:57
  2. static linking issue
    By ashwini in forum Qt Programming
    Replies: 2
    Last Post: 29th May 2006, 12:40
  3. I got two problems when I used static compiled library of QT4
    By qintm in forum Installation and Deployment
    Replies: 8
    Last Post: 20th April 2006, 08:52
  4. Replies: 4
    Last Post: 20th February 2006, 09:11
  5. Replies: 4
    Last Post: 14th February 2006, 21:35

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.