microsoft / IPC

IPC is a C++ library that provides inter-process communication using shared memory on Windows. A .NET wrapper is available which allows interaction with C++ as well.
Other
484 stars 119 forks source link

Compiled the new 2019 version - compilation error on unit tests #34

Closed mediabuff closed 4 years ago

mediabuff commented 4 years ago

Generating Code... 5>libboost_unit_test_framework-vc142-mt-gd-x64-1_71.lib(test_tools.obj) : error LNK2005: "public: cdecl boost::test_tools::tt_detail::context_frame::context_frame(class boost::unit_test::lazy_ostream const &)" (??0context_frame@tt_detail@test_tools@boost@@QEAA@AEBVlazy_ostream@unit_test@3@@Z) already defined in boost_unit_test_framework-vc140-mt-gd.lib(boost_unit_test_framework-vc142-mt-gd-x64-1_71.dll) 5>libboost_unit_test_framework-vc142-mt-gd-x64-1_71.lib(test_tools.obj) : error LNK2005: "public: __cdecl boost::test_tools::tt_detail::context_frame::~context_frame(void)" (??1context_frame@tt_detail@test_tools@boost@@QEAA@XZ) already defined in boost_unit_test_framework-vc140-mt-gd.lib(boost_unit_test_framework-vc142-mt-gd-x64-1_71.dll) 5>libboost_unit_test_framework-vc142-mt-gd-x64-1_71.lib(test_tools.obj) : error LNK2005: "public: cdecl boost::test_tools::tt_detail::context_frame::operator bool(void)" (??Bcontext_frame@tt_detail@test_tools@boost@@QEAA_NXZ) already defined in boost_unit_test_framework-vc140-mt-gd.lib(boost_unit_test_framework-vc142-mt-gd-x64-1_71.dll)

ara-ayvazyan commented 4 years ago

Can you be more specific about the issue and how do you build it? I don't see any issues with the latest build.

In the error message that you shared there is a reference to vc140 versions of Boost which is no longer referenced in the project.

mediabuff commented 4 years ago

Thanks for pointing out. May be that wa the issue.I moved the projects to vcpkg. Don’t have this issue any more.

By the way the unittests module need to link with bcrypt.lib - for supporting RandomString