When I run a simple application that uses a library, Ogre3D in my case,
from NetBeans, it breaks with the following message:

Error occurred during execution: InternalErrorException:
Could not load dynamic library
/snap/netbeans/84/usr/local/lib/OGRE/RenderSystem_GL.
System Error: /snap/netbeans/84/usr/local/lib/OGRE/RenderSystem_GL.so.14.1:
cannot open shared object file:
No such file or directory in DynLib::load at
/home/fedor/projecten/c++/ogre-14.1.0/OgreMain/src/OgreDynLib.cpp (line 136)


The app can not find a library it needs and it looks like it is appending
the search path I gave it (usr/local/lib/OGRE) to the installation path of
NetBeans (/snap/netbeans/84).

When I launch the same app without NetBeans, just by clicking on it, it
runs fine.

How can I get the app when launched from NetBeans to use the right working
directory and search in the propper locations for libs?

*(Using Ubuntu 22.04LTS, NetBeans 19 with g++ version 11.4.0)*

Reply via email to