静态链接,boost :: locale

时间:2016-10-19 20:58:20

标签: c++ boost static-linking

由于各种不兼容的不同系统上的升级库版本。我需要链接使用boost :: locale的静态程序。

但是我因为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

参考Trying to statically link Boost。 <{1}}和/或-pthread稍微增加有帮助,但仍然不完全。

build log (nopaste)

系统:

-lboost_thread

提升版:

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="15.10 (Wily Werewolf)"

0 个答案:

没有答案