c++ - 在 DLL 项目中使用 Boost (ActiveX)

标签 c++ boost dll visual-studio-2013 boost-asio

我正在尝试使用 Visual Studio 2013 在 ActiveX DLL 项目上使用 Boost.Asio。 不确定出了什么问题,但在构建时出现这些错误:

Error 34 error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "public: __thiscall boost::system::error_code::error_code(void)" (??0error_code@system@boost@@QAE@XZ) C:\eCompany\activex-dll\maindoor\RESTClient.obj maindoor Error 35 error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'errno_ecat''(void)" (??__Eerrno_ecat@system@boost@@YAXXZ) C:\Projects\eCompany\activex-dll\maindoor\RESTClient.obj maindoor Error 36 error LNK1120: 2 unresolved externals C:\Projects\eCompany\activex-dll\maindoor\Debug\maindoorEWI.dll 1 1 maindoor

我已经在预处理器中添加了 BOOST_ALL_NO_LIB。项目中可能缺少什么?

最佳答案

简短的答案是做这样的事情:

C:\local\boost_1_58_0>bjam.exe runtime-link=static

并删除其设置的BOOST_ALL_NO_LIB,然后再次构建DLL。这应该可以解决这个问题。

关于c++ - 在 DLL 项目中使用 Boost (ActiveX),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31301128/

相关文章:

c# - Visual Studio - 引用第三方 DLL

c++ - 错误 : the application was unable to start correctly

c++ - 构造函数初始化列表与在头文件中初始化

c++ - 错误 : Must have class type

c++ - 定义函数的时候,是不是也声明了?

c++ - 用数学表达式拆分字符串

c++ - 链接 Visual Studio 2008 Express '/Mtd' 设置时 Boost 崩溃

android - 在 Android Studio 中为 NDK 项目构建符号花费的时间太长

c++ - 在静态断言中引用此指针?

c++ - 使用运行时 DLL 加载时,C++ 编译器/链接器会做什么?