[Qt-creator] How set -rpath or -rpath-link from QT project file?
Ed Sutton
ESutton at fescorp.com
Tue Jan 26 20:32:03 CET 2010
Thank you both Marc Durant and Coda Highland !
LIBS += --rpath,$$(PWD)/../lib -lmylib
For g++ 4.1.2 I needed 2 hyphens preceding rpath.
And thank you Coda for advising to use $$(PWD).
-Ed
On Dec 23, 2009, at 1:32 PM, Marc Durant wrote:
> You'll need to add an "rpath" option in your .pro file. Here's an
> example from one of my projects where I give the library directory for
> python, the rpath directory, and then the library itself. The
> directory named by rpath tells the executable where to look for this
> particular library.
>
> LIBS += -L/home/mdurant/Source/visit2_svn/visit/python/2.5/linux-
> x86_64_gcc-4.3.0/lib/python2.5/config \
> -Wl,-rpath,/home/mdurant/Source/visit2_svn/visit2.0.0/
> python/2.5/linux-x86_64_gcc-4.3.0/lib/python2.5/config \
> -lpython2.5
>
> -marc
>
> On Dec 23, 2009, at 12:16 PM, Ed Sutton wrote:
>
>> When I run the Qt created Makefile to build the client that uses my
>> shared library, I get the following warning:
>>
>> /mylib.so, not found (try using -rpath or -rpath-link)
>>
>> Can someone please provide and example of what to add to the QT
>> project file to generate a happy Makefile?
>>
>> It builds fine from within QT Creator after I had set the build
>> environment LD_LIBRARY_PATH to include the shared library path.
>>
>> Thanks in advance,
>>
>> -Ed
>>
>>
>> _______________________________________________
>> Qt-creator mailing list
>> Qt-creator at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
-Ed
More information about the Qt-creator-old
mailing list