在一个DLL项目(ActiveX)中使用Boost [英] Using Boost in a DLL project (ActiveX)

查看:237
本文介绍了在一个DLL项目(ActiveX)中使用Boost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2013在ActiveX DLL项目中使用Boost.Asio。
不知道什么是错误,但是当构建这些错误时出现:

I'm trying to use Boost.Asio on a ActiveX DLL project using Visual Studio 2013. Not sure what is wrong but when building these error shows up:


错误34错误LNK2019:未解析的外部符号class
boost :: system :: error_category const& __cdecl
boost :: system :: system_category(void)
(?system_category @ system @ boost @@ YAABVerror_category @ 12 @ XZ)引用
在函数public:__thiscall
boost :: system :: error_code :: error_code(void)
(?0error_code @ system @ boost @@ QAE @ XZ)C:\eCompany\activex-dll\maindoor\RESTClient.obj maindoor
错误35错误LNK2019:未解析的外部符号类
boost :: system :: error_category const& __cdecl
boost :: system :: generic_category(void)
(?generic_category @ system @ boost @@ YAABVerror_category @ 12 @ XZ)
in functionvoid __cdecl boost :: system ::`dynamic initializer for
'errno_ecat''(void)
(?? __ Eerrno_ecat @ system @ boost @@ YAXXZ)C:\Projects\eCompany\activex-dll\maindoor\RESTClient.obj maindoor
错误36错误LNK1120:2未解决
外部C:\Projects\eCompany\activex-dll\maindoor\Debug\maindoorEWI.dll 1 1 maindoor

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 。项目中可能缺少什么?

I already added BOOST_ALL_NO_LIB in the Preprocessor. What could be missing in the project?

推荐答案

简短的答案是这样做:

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

并删除BOOST_ALL_NO_LIB是它的集合,然后再次构建DLL。这应该解决这个问题。

and remove BOOST_ALL_NO_LIB is its set, then build the DLL again. That should fix that.

这篇关于在一个DLL项目(ActiveX)中使用Boost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆