xkm
xkm

Reputation: 271

Using Boost in a DLL project (ActiveX)

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:

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

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

Upvotes: 2

Views: 214

Answers (1)

quarks
quarks

Reputation: 35282

The short answer is to do something like this:

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

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

Upvotes: 2

Related Questions