Results 1 to 3 of 3

Thread: How can I set where a Qt app finds a Qt lib?

  1. #1
    Join Date
    Dec 2009
    Posts
    29
    Thanks
    2
    Thanked 3 Times in 3 Posts

    Default How can I set where a Qt app finds a Qt lib?

    I would like to include libQtGui.so.4 libQtNetwork.so.4 and libQtCore.so.4 in the same directory as where my app resides. How would I make Qt understand this? y purpose is to have a standalone app that uses shared libraries

  2. #2
    Join Date
    Mar 2009
    Posts
    104
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: How can I set where a Qt app finds a Qt lib?

    what OS you work on?If Mac OS X, i'll save you a lot of time, because i had the same problem.
    The only think you can do is:

    1.Open Terminal
    2.Enter in the folder where is your .app file
    3.enter: macdeployqt yourfile.app
    4.enter

    You'll notice that the size of the .app file will become about 36-37MB All libraries that your application needs will be automatically included in the app bundle

  3. The following user says thank you to unix7777 for this useful post:

    yodasoda (24th March 2010)

  4. #3
    Join Date
    Dec 2009
    Posts
    29
    Thanks
    2
    Thanked 3 Times in 3 Posts

    Default Re: How can I set where a Qt app finds a Qt lib?

    thanks alot, im on linux actually and have found how to do it but I also do Mac stuff and Im sure it will come in handy. The way I did it was to add a special directive in my .pro file but I think it is possible to do it using QLibrary. The special directive I added was

    unix:!mac{
    QMAKE_LFLAGS += -Wl,-rpath=\\\$\$ORIGIN
    }
    I put theQt libs in my project directory and added LIBS+= libQt.so.4 in my .pro file.

Similar Threads

  1. Replies: 0
    Last Post: 11th August 2009, 09:38
  2. how isRunning() finds thread is running?
    By quickNitin in forum Newbie
    Replies: 1
    Last Post: 13th June 2006, 08:03

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.