Due to various non-compatible with each other boost library versions on different systems. I need to link statically program that uses boost::locale.
But I fail to it because of the boost::locale::generator.
// simple example - static_locate.cpp
#include <boost/locale.hpp>
int main () {
boost::locale::generator gen;
return 0;
}
g++ build:
$ g++ staic_locale.cpp -lboost_system -lboost_locale || works
$ g++ --static staic_locale.cpp -lboost_system -lboost_locale && a lot of linking errors
Refering to Trying to statically link Boost. Adding -pthread
and/or -lboost_thread
a little bit helps, but still not completely.
system:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="15.10 (Wily Werewolf)"
boost version:
$ apt-cache policy libboost-dev
libboost-dev:
Installed: 1.58.0.0ubuntu1