我刚刚开始第一次使用 Boost,详细信息:
- 我正在使用 Visual Studio 2008 SP1
- 我正在做一个 x64 构建
- 我只使用 boost::asio (以及它具有的任何依赖项)
我的代码现在可以编译,我将我的项目指向 boost 库(在构建 x64 库之后)并解决了一些简单的问题,现在我面临一个链接器错误:
2>BaseWebServer.obj : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_system_category(void)" (?get_system_category@system@boost@@YAAEBVerror_category@12@XZ)
2>BaseWebServer.obj : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::get_generic_category(void)" (?get_generic_category@system@boost@@YAAEBVerror_category@12@XZ)
有任何想法吗?
我添加了这个定义:#define BOOST_LIB_DIAGNOSTIC
现在在我的输出中,我看到了:
1>Linking to lib file: libboost_system-vc90-mt-1_38.lib
1>Linking to lib file: libboost_date_time-vc90-mt-1_38.lib
1>Linking to lib file: libboost_regex-vc90-mt-1_38.lib
这似乎表明它实际上是在系统库中链接。