How to Link to local copy of shared library?
I'm porting a Windows 7 software project to CentOS 6.5. The project is composed of 4 executable and 9 plugins. The project depends on 12 shared libraries from Qt4.8, Chilkat and FFmpeg.
The software needs to be delivered as a RPM with all dependencies included.
The 4 executables are copied into a folder named PICTE.
The 12 shared libraries are copied into a folder PICTE/lib
Linking the Chilkat lib works with the following spec in the .pro file
QMAKE_CXXFLAGS += -ffriend-injection
QMAKE_LFLAGS = -Wl,-rpath,lib
LIBS += -l lib/libchilkat-9.5.0.so
LIBS += -l lib/libQtCore.so.4.8.6
LIBS += -l lib/libQtGui.so.4.8.6
LIBS += -l lib/libQtNetwork.so.4.8.6
However, the Qt libs return the error "No such file or directory".
I have also tried this with the dot reference:
QMAKE_LFLAGS = -Wl,-rpath,.
and also with:
QMAKE_LFLAGS = -Wl,-rpath-link,lib
QMAKE_LFLAGS = -Wl,-rpath-link,.
and with quotes:
QMAKE_LFLAGS = '-Wl,-rpath-link,lib'
and got the same result.
This seems like it should be possible to link to shared libraries bundles with my app.
Does anyone have a working example on how to do this?
Thanks,
Jeff H
Last edited by heyobj; 11-25-2014 at 05:12 PM.
Reason: Improve title
|