Since your running Linux, is there a reason you have not installed the libraries in the default library search path?

If so, you can set LD_LIBRARY_PATH to run your program.