在调试我的代码时,我喜欢使用-g -D_GLIBCXX_DEBUG、GCC标志(而不是-O3 -DNDEBUG)来构建它。不幸的是,使用这些标志会阻止它与“正常”的Boost链接。有没有一个简单的方法来构建像这样的定制的GCC标志的Boost?(Another SO question about this似乎没有涵盖-D_GLIBCXX_DEBUG)
produce help message");
boost::program_options::store(boost::program_options::parse_command_line(ac, av, desc), vm);}
它使用例如g++ test.cpp -lboost_program_options_ZN5boost15program_option