Results 1 to 2 of 2

Thread: Using third-party libraries in qt

  1. #1
    Join Date
    May 2009
    Posts
    1
    Qt products
    Qt3 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Using third-party libraries in qt

    How do I use a function defined in a third-party library from inside qt?

    For example, when I click on a submit button, I want the function func_lib1 () which is defined in the third party library to be called. Basically, how do I link that library with qt?

    Os used: Fedora core 5
    Library Extn- "la"
    qt ver- 3.3

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

    Default Re: Using third-party libraries in qt

    .la is not a real library, it's a libtool archive - there is a .so file somewhere that keeps it company.

    Basically all you need to do is to add the following to your qmake project file:
    qmake Code:
    1. LIBS+= -L/path/to/dir/containing/the/library -llibraryname_without_lib_prefix_and_so_suffix
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QDevelop, a new IDE for Qt4
    By jlbrd in forum Qt-based Software
    Replies: 165
    Last Post: 28th February 2009, 09:42
  2. Replies: 2
    Last Post: 30th September 2007, 22:23
  3. Qt 3.3 libraries
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st December 2006, 18:25
  4. Standardization on libraries
    By brcain in forum General Discussion
    Replies: 13
    Last Post: 16th August 2006, 23:56
  5. Replies: 4
    Last Post: 7th March 2006, 09:52

Tags for this Thread

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.