PDA

View Full Version : How to set up a path to libraries?


Zingam
November 2nd, 2005, 02:56 AM
Hi,

I want to include libsdl, libglew and other libs in my application. I want to put them in a subdirectory. The reason to do this is because I don't want to force the user to install these libraries to run my application.

Any ideas how can I do that?

ngms27
November 2nd, 2005, 03:14 AM
That depends on the Langauge you are using, but generally they will look in the directory where the app is launched from for missing dependancies.

JonnyT

toojays
November 2nd, 2005, 05:26 AM
<post removed due to being redundant>

toojays
November 2nd, 2005, 05:27 AM
It's not clear to me what JonnyT's post is meaning.

Probably the easiest way to get the result you want is to link your application statically. If you don't want to do that (perhaps for licensing reasons), you can use the GNU linker's "rpath" argument. If that won't work (you don't know where the application will be installed), you will need to use dlopen.

Zingam
November 2nd, 2005, 05:45 AM
LD_LIBRARY_PATH

What about setting this variable? NWN uses it but I couldn't make it work for me?

toojays
November 2nd, 2005, 06:50 AM
Yeah, LD_LIBRARY_PATH should work as well.