This question has already been answered:
- GCC, link with dynamic library 1 answer
How to specify the path to the library?
There is an example binary, which when launched requires you to specify the path to the libraries libex.so , libamp.so . You need to write a script script.sh , which will indicate the path to these libraries.
There are feats, but curves and incorrect. Script content:
LD_LIBRARY_PATH=libex:. libamp:. ./example I have a complete mess in my head with these ways.