[Qt-interest] Setting library path before running?
william.crocker at analog.com
william.crocker at analog.com
Tue Mar 23 11:37:27 CET 2010
Gabriel M. Beddingfield wrote:
>
> On Tue, 23 Mar 2010, Anatoly Burakov wrote:
>
>> I have an app with plugins. They all end up in appropriate directories
>> (via DESTDIR), everything works fine, except one thing. On Windows,
>> whenever the library is in the same folder - it gets loaded fine, that
>> is, i am able to launch my program right from QT Creator. On Linux,
>> however, everything works fine except i can't launch the program without
>> resorting to manually launching it from command-line (env
>> LD_LIBRARY_PATH=/path/to/my/dir). Are there any ways around this without
>> setting permanent environment variable in rc files?
>
> Check out 'man ld.so'. Basically, you can either set
> LD_LIBRARY_PATH, or...
>
> * put your .so files in /usr/lib or /usr/local/lib.
> Run ldconfig after install.
>
> * put your .so files somewhere else and put the
> path in ld.so.conf. Run ldconfig.
>
> * load your shared libraries via dlopen... but
> you probably don't want to do this. :-)
>
We run our apps through a wrapper script which sets
LD_LIBRARY_PATH first.
> HTH,
> Gabriel
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list