I have a very basic client/server project that uses boost::asio
. It generates two executables, a client and a server.
When I run the client, I get the following:
./client: error while loading shared libraries:
libboost_system.so.1.55.0: cannot open shared object
file: No such file or directory
This means that the program requires the boost_system
binary to be loaded dynamically at run-time. This makes sense, as one dependency of boost_asio
is boost_system
.
What does this mean for the ease of distributing my application to end-users?
1) Do I simply pop my development version of the boost_system
binary on my system, which in this case is libboost_system.so.1.55.0
? How do I ensure that when the user runs the client, it will find the dynamic archive? Obviously, on my system, even with my boost install it still didn't find the archive.
2) I am building on Linux and thus I have .so binaries. How will #1 change if I try to cross-compile my app for Windows with mingw-w64?
I am brand-spanking new to distributing C++ programs and working with dynamic/shared libraries.
When I compile statically, I get the following warning:
Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking