PDA

View Full Version : Using third-party libraries in qt



apj
15th May 2009, 12:35
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

wysota
15th May 2009, 22:27
.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:
LIBS+= -L/path/to/dir/containing/the/library -llibraryname_without_lib_prefix_and_so_suffix