CPP-netlibのV0.9をコンパイルするとき、私は、Visual Studio 2010からcpp-netlibライブラリーを構築するが、次のリンカエラーを取得しようとしています:未解決の外部シンボルエラー
error LNK2019: unresolved external symbol "bool __cdecl boost::network::uri::detail::parse_uri_impl(class boost::iterator_range,class std::allocator > > &,struct boost::network::uri::detail::uri_parts_default_base &,struct boost::network::tags::default_string)" ([email protected]@[email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected][email protected]@[email protected]@[email protected]@Z) referenced in function "bool __cdecl boost::network::uri::detail::parse_uri,class std::allocator >,struct boost::network::http::tags::http_default_8bit_tcp_resolve>(class std::basic_string,class std::allocator > &,struct boost::network::uri::detail::uri_parts &)" ([email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@@[email protected]@Z)
このことを上がって掘りを少し私が使用しているBoostのバージョン(1.46.1)に関連する可能性がありますが、私は1.47.0と1.45.0の両方に対してコンパイルを試み、同じエラーが発生しました。
このライブラリをコンパイルするには何が必要ですか?私のような私のCPP-netlibのヘッダを前に、そのマクロ定義を追加した場合、私はコンパイルすることができる午前
- An option to turn off the required external library to be linked with a macro (BOOST_NETWORK_NO_LIB). With this macro defined before any cpp-netlib headers are included (or on the command line) the functions that were made extern or just free functions at namespace level are marked 'inline' and have their definitions pulled in accordingly in each translation unit. This addresses Jeff Garland's and others' concern of the need for an external library when using cpp-netlib when it's always been header-only until 0.9. I'm still wrestling with the thought of making the header-only behavior a default, but I'm not married to the "external library as default" decision either.
を:
私はブーストに問題はないようですが、cpp-netlib(あなたのインストールでは、とにかく)を使っています。 –