Setting the search path environment variable for shared libraries

René J.V. Bertin rjvbertin at gmail.com
Sun Jun 28 22:32:45 BST 2020


On Sunday June 28 2020 20:25:26 Steve the Fiddle wrote:

>wxWidgets is installed at "/opt/wxWidgets/lib/", and this is set in
>"~/.bashrc" with:
>"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/wxWidgets/lib/"

A more proper way to work with this kind of install would be to add /opt/wxWidgets/lib to Audacity's rpath. Or, if any and all wxWidgets apps should use the libraries there you could add the location to ldconfig.

>It appears that kdevelop ignores LD_LIBRARY_PATH

I think it's rather the contrary, i.e. that KDevelop resets that variable.

>How do I tell kdevelop where to find wxWidgets so that I can launch and
>debug from within kdevelop?

IIRC you can associate an environment profile to your debug configuration, and set your variable(s) that way.

An alternative approach would be to launch Audacity like you would normally (except the debug build), and then attach KDevelop's debugger to the running process. This is typically faster if you're not debugging the startup phase itself, sometimes a lot faster.

R


More information about the KDevelop mailing list