PDA

View Full Version : Link shared library .so files



lucadambros
8th July 2016, 11:24
Hi,
I want to link my .so file to the cpp.
I also have a .h file that is used in the cpp.

What can I do?

I don't want to modify the pro file because I musn't use it

anda_skoa
8th July 2016, 12:02
Well, you need to modify the .pro file because you need to tell the linker about the library and that is done with the LIBS variable in the .pro file.

Cheers,
_

ChrisW67
8th July 2016, 12:08
Assuming:

you are on a Linux box or the like
you are not using Qt because you must not use a PRO file
you are using GCC and associated tools

then you want the -L and -l options to your linker (ld)