2012-07-27 97 views
3

我正試圖鏈接到使用Xcode V 4.4升級Mountain Lion 1.4 我使用的是gcc 4.7,因此不應該涉及Xcode的東西。 每次我triing鏈接它給了我這樣的:Boost Mountain Lion鏈接

/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 

升壓是建立在更新後,它

我嘗試使用的MacPorts或自制構建之前的工作,但是這一切都打破.. 。

回答

1

這裏是我以前的基礎上10.8升壓(與從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

+0

你肯定第5步?這似乎與步驟3相矛盾。我的boost文件以boost_1_50_0/boost結尾,bootstrap.sh創建/opt/boost-1.50。 – alecail 2012-10-13 08:18:45

+0

最後一步並不重要,它只是給了我一種使用無版本的路徑運行的方法。每當我編譯新版本的軟件包時,我都會更新這些鏈接以指向最新版本。 – 2013-07-08 04:55:26