[Qt-interest] Setting library path before running?
william.crocker at analog.com
william.crocker at analog.com
Tue Mar 23 16:08:15 CET 2010
Brad Howes wrote:
> On Mar 23, 2010, at 7:53 AM, Oliver.Knoll at comit.ch wrote:
>
>> william.crocker at analog.com wrote on Tuesday, March 23, 2010 11:37 AM:
>>
>>> ...
>>> We run our apps through a wrapper script which sets LD_LIBRARY_PATH
>>> first.
>> You can also include the '.' (current directory) to the "build-in" library paths of the executable. Read about the -rpath linker option (and you can set this via qmake/*.pro files, too).
>
>
> Note that some platforms, notably Solaris IIRC, do not follow relative links due to potential security issues. To be safe, use $PWD or $(pwd) to insert the current directory. Not sure of the qmake syntax, but I'm sure there is an appropriate variable to use to fetch it.
>
And, in the rare event that your app will be running as root (like mine does)
then the rules change again. No LD_LIBRARY_PATH, for example.
> Brad
>
More information about the Qt-interest-old
mailing list