小编hta*_*lor的帖子

使用g ++ 4.8在Mac OS X上编译boost :: program_options(Mac端口)

我正在尝试使用gcc 4.8(通过MacPorts安装)编译boost :: program_options示例中的一个,http: //svn.boost.org/svn/boost/trunk/libs/program_options/example/first.cpp.但是,我不断收到错误:

Undefined symbols for architecture x86_64:
  "boost::program_options::to_internal(std::basic_string, std::allocator > const&)", referenced from:
      std::vector, std::allocator >, std::allocator, std::allocator > > > boost::program_options::to_internal, std::allocator > >(std::vector, std::allocator >, std::allocator, std::allocator > > > const&) in ccEWnIGV.o
  "boost::program_options::options_description::options_description(std::basic_string, std::allocator > const&, unsigned int, unsigned int)", referenced from:
      _main in ccEWnIGV.o
  "boost::program_options::invalid_option_value::invalid_option_value(std::basic_string, std::allocator > const&)", referenced from:
      void boost::program_options::validate(boost::any&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, double*, long) in ccEWnIGV.o
  "boost::program_options::error_with_option_name::error_with_option_name(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, int)", referenced from:
      boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, int) …

c++ macos gcc boost llvm-gcc

6
推荐指数
2
解决办法
6563
查看次数

标签 统计

boost ×1

c++ ×1

gcc ×1

llvm-gcc ×1

macos ×1