c++ - C++ Boost 库中的链接错误

标签 c++ boost linker 32bit-64bit

我是 C++ Boost 库的新手。

我已经在 BoostPro Computing 网站上安装了 Boost 1.51,包括 32 位和 64 位版本(在两个不同的文件夹中(boost_1_51 和 boost_1_51_x64)。

我尝试使用 Visual Studio 2005 SP2(在 32 位 Windows 操作系统上)为 x64 构建并遇到以下错误:

error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ)
error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ)

我在项目配置中做了库链接(附加包含和库目录的 boost 路径)。例如:

include: C:\Program Files\boost\boost_1_51_x64\

library: C:\Program Files\boost\boost_1_51_x64\lib

谁能帮我找出上面的链接错误?

最佳答案

来自上面的评论:

I solved the problem by re-installing the boost library (64-bit version). Maybe there were some errors during my last installation.

关于c++ - C++ Boost 库中的链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12390131/

相关文章:

c++ - C++11 标准是否要求通过常量 unordered_container 的两次迭代以相同的顺序访问元素?

c++ - 如何将 Microsoft C++ 解决方案导入 Eclipse?

c++ - 未声明的标识符自定义类

android - 有什么方法可以知道 Android 应用程序链接是否会打开应用程序?

c++读取时同步共享内存

makefile - 将 Autotooled 项目编译为 LLVM 位代码时出现链接器错误

c++ - 我应该谨慎使用 boost::archive 吗?

c++ - 使用指针交换数组的内容

c++ - 在同一个程序中使用 cereal 和 boost 序列化

C++,自使用 boost 和 std::chrono 以来的时间?为什么 Boost 版本慢 10 倍?