2
votes

I am trying to run some basic server/client software from the Boost:Asio tutorials. The application works fine on the localhost, but when I compile and move the compiled program to another server, it is unable to find the libraries (which makes sense because they are not there). When I compiled, I thought I linked the libraries in by typing:

g++ -I /usr/local/boost_1_52_0 client.cpp -o client -lpthread -lboost_system

If I have to distribute the libraries with every client software I install on my network, wouldn't that defeat the purpose of having a cross platform solution like Boost? Am I missing something? Is there a way to package a library into the compiled code so it is distributed with the software?

Similar to: error while loading shared libraries: libboost_system.so.1.45.0: cannot open shared object file: No such file or directory

(but not the same).

1
One option would be to build a static executable. - juanchopanza
you could distribute your software in RPM form with a dependency on the boost RPM. - Sam Miller
Thanks guys. I'll try this! - Jeff

1 Answers

1
votes

As stated above, the -static option was neededd.