0
我使用LLVM GCC 4.2編譯器,但出於一個原因,我想使用蘋果LLVM編譯器。我使用靜態鏈接的一些boost庫。升壓失敗與蘋果llvm program_options編譯
我的部分代碼是在這裏:
#include <boost/program_options/detail/config_file.hpp>
std::set<std::string> options;
std::map<std::string, std::string> parameters;
options.insert("*");
for (config_file_iterator i(config, options), e ; i != e; ++i)
parameters[i->string_key] = i->value[0];
當我改變了編譯器在Xcode 4.5.1蘋果LLVM 4.1,它給了我這個錯誤:
In file included from A.cpp:16: boost_1_46_1/boost/program_options/detail/config_file.hpp:163:17: error: call to function 'to_internal' that is neither visible in the template definition nor found by argument-dependent lookup s = to_internal(in); ^ A.cpp:82:39: note: in instantiation of member function 'boost::program_options::detail::basic_config_file_iterator::getline' requested here for (config_file_iterator i(config, options), e ; i != e; ++i) ^ boost_1_46_1/boost/program_options/detail/convert.hpp:70:48: note: 'to_internal' should be declared prior to the call site or in namespace '__gnu_cxx'
BOOST_PROGRAM_OPTIONS_DECL std::string to_internal(const std::string&);
有人知道什麼是解決方案嗎?
我不認爲有這樣的事情,「LLVM GCC 4.2」編譯器... – LtWorf
@LtWorf我添加了一個截圖,你可以看到編譯器選項。 –
Mh必須是蘋果的方式叫「DragonEgg」我想...... – LtWorf