🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Portable Shared Library

Started by
1 comment, last by Yann L 12 years, 10 months 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
Advertisement
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.
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