0
votes

I'm executing the following compilation command line:

g++ -std=c++11 -I/home/admin/Github/casablanca/Release/include -L/home/admin/Github/casablanca/Release/build.debug/Binaries test.cc -o test -lboost_system -lcrypto -lssl -lcpprest

The compilation succeeds but I'm getting this error during runtime:

./test: error while loading shared libraries: libcpprest.so.2.8: cannot open shared object file: No such file or directory

Although the file libcpprest.so.2.8 exist in the location specified:

admin:$ ls /home/admin/Github/casablanca/Release/build.debug/Binaries/libcpprest.so*
/home/admin/Github/casablanca/Release/build.debug/Binaries/libcpprest.so
/home/admin/Github/casablanca/Release/build.debug/Binaries/libcpprest.so.2.8

I would appreciate any advice

Thanks

1

1 Answers

1
votes

I'm guessing the runtime error is because the path "/home/admin/Github/casablanca/Release/build.debug/Binaries/" is not included in the LD_LIBRARY_PATH environment variable. If you do "echo $LD_LIBRARY_PATH" in the shell you're running from it should confirm.