Results 1 to 6 of 6

Thread: Using external libraries

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2010
    Posts
    137
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Using external libraries

    Hi Handi,

    I am getting the same error. i am wondering if you have overcome the problem. If so please let me know the solution.

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Using external libraries

    Quote Originally Posted by baluk View Post
    Hi Handi,

    I am getting the same error. i am wondering if you have overcome the problem. If so please let me know the solution.
    What error? The only thing mentioned above is that something "can't find any of those files" or "it doesn't work." An actual error message would be quite helpful, but I don't see any. At a minimum, it would illuminate whether the problem is an inability to locate the header files or the library files.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Using external libraries

    To quote and repair an earlier answer in this thread.

    At compile time:
    • Use INCLUDEPATH to define extra locations to be searched for header files
    • Use LIBS -L options to define extra locations to be searched for libraries
    • Use LIBS -l options to name the libs to be used.

    Example:
    Qt Code:
    1. INCLUDEPATH += /home/me/foo/include
    2. LIBS += -L/home/me/foo/lib -lfoo
    To copy to clipboard, switch view to plain text mode 

    At run time the dynamically loadable libraries must be locatable by the operating system:
    • On Windows: In the current working directory of the executing process (note that this is rarely the same as the source code directory) or on the system PATH.
    • On Linux: In directories listed in the LD_LIBRARY_PATH environment variable (if it exists) and on the system library path (see /etc/ld.so.conf). See man ld.so for other, less used options.
    • On Mac OS X: Probably similar to Linux but bound to be different in detail.

Similar Threads

  1. QtCreator and external libraries
    By GiuseppeBonfa in forum Qt Tools
    Replies: 6
    Last Post: 21st May 2012, 23:26
  2. Replies: 4
    Last Post: 22nd May 2011, 13:36
  3. How to add external Header files and libraries?
    By askbapi in forum Installation and Deployment
    Replies: 6
    Last Post: 30th September 2010, 17:33
  4. Replies: 4
    Last Post: 7th May 2009, 07:19
  5. add external api
    By adamatic in forum Qt Programming
    Replies: 6
    Last Post: 16th April 2009, 10:25

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
  •  
Qt is a trademark of The Qt Company.