undefined reference to boost::program_options in xubuntu

前端 未结 1 1002
时光说笑
时光说笑 2021-01-20 09:23

I have this file

#include 
namespace po = boost::program_options;

#include 
using namespace std;

int main(         


        
1条回答
  •  执笔经年
    2021-01-20 09:48

    Looks like boost was compiled with pre-C++11 std::basic_string, whereas your code is compiled with C++11 std::basic_string.

    Try re-compiling your code with -D_GLIBCXX_USE_CXX11_ABI=0 compiler command line option. See GCC5 and the C++11 ABI for more details:

    In most cases, it will be obvious when this flag is needed because of errors from the linker complaining about unresolved symbols involving __cxx11.

    0 讨论(0)
提交回复
热议问题