Advertisement

Portable Shared Library

Started by August 26, 2011 04:21 PM
1 comment, last by Yann L 13 years ago
I am trying to run my program straight from a folder without being installed. When I run the program I get a error saying error while loading shared library. I know in windows i can put the dll in the same folder as the executable and it will work I have put the .so file in the folder but it still isnt working. Can anyone tell me that this works and im just doing something wrong or can someone point me in a direction to achieve the desired result? Thank You
Well i found I can make a script with export LD_LIBRARY_PATH=./ in it to make it work but I would like to make the executable file just run when clicked on and not a script to run it.
Advertisement
Use an rpath with $ORIGIN when linking the executable.

Note that while it works well, properly escaping the $ sign is a major pain in the ass. Some more info here.

This topic is closed to new replies.

Advertisement