gpt4 book ai didi

c++ - Boost Mountain Lion 链接

转载 作者:太空狗 更新时间:2023-10-29 23:07:46 25 4
gpt4 key购买 nike

我正在尝试使用 Xcode V 4.4 链接到 Mountain Lion 上的 boost 1.50我使用的是 gcc 4.7,所以不应该涉及 Xcode 的东西。每次我尝试链接时,它都会给我这个:

/usr/local/bin/g++  -o bin/parse -Lbin `root-config --ldflags`    build/Bcf.o build/Bmf.o build/Boc.o build/EasyBMP.o build/Fei4.o build/Options.o build/RxChannel.o build/TxChannel.o -lboost_program_options -lboost_system -lboost_filesystem  -lboc `root-config --libs` build/parse.o
Undefined symbols for architecture x86_64:
"start", referenced from:
-u command line option
(maybe you meant: boost::property_tree::string_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::property_tree::id_translator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::cstart() const, boost::progress_display::restart(unsigned long) , boost::property_tree::json_parser::json_grammar<boost::property_tree::basic_ptree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::definition<boost::spirit::classic::scanner<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skip_parser_iteration_policy<boost::spirit::classic::alternative<boost::spirit::classic::alternative<boost::spirit::classic::space_parser, boost::spirit::classic::confix_parser<boost::spirit::classic::strlit<char const*>, boost::spirit::classic::kleene_star<boost::spirit::classic::anychar_parser>, boost::spirit::classic::alternative<boost::spirit::classic::eol_parser, boost::spirit::classic::end_parser>, boost::spirit::classic::unary_parser_category, boost::spirit::classic::non_nested, boost::spirit::classic::is_lexeme> >, boost::spirit::classic::confix_parser<boost::spirit::classic::strlit<char const*>, boost::spirit::classic::kleene_star<boost::spirit::classic::anychar_parser>, boost::spirit::classic::strlit<char const*>, boost::spirit::classic::unary_parser_category, boost::spirit::classic::non_nested, boost::spirit::classic::is_lexeme> >, boost::spirit::classic::iteration_policy>, boost::spirit::classic::match_policy, boost::spirit::classic::action_policy> > >::start() const )
"boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)", referenced from:
boost::filesystem::exists(boost::filesystem::path const&) in Bcf.o
"boost::filesystem::detail::file_size(boost::filesystem::path const&,boost::system::error_code*)", referenced from:
boost::filesystem::file_size(boost::filesystem::path const&) in Bcf.o
ld: symbol(s) not found for architecture x86_64

Boost 是在更新后构建的,并且在之前有效

我尝试使用 macports 或自制软件构建它,但这破坏了一切......

最佳答案

这是我用来在 10.8 上构建 Boost 的方法(使用来自 App Store 的最新 Xcode),它绝对有效:

  1. 下载http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download

  2. tar jxvf boost_1_50_0.tar.bz2 && cd "boost_1_50_0/"

  3. ./bootstrap.sh --prefix=/opt/boost-1.50

  4. (作为管理员用户)sudo ./b2 install

  5. sudo ln -snf boost-1.50/opt/boost

关于c++ - Boost Mountain Lion 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11691744/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com