Boost linker error: Unresolved external symbol “class boost::system::error_category const & __cdecl boost::system::get_system_category(void)”

前端 未结 10 2251
执念已碎
执念已碎 2020-12-01 15:32

I\'m just getting started with Boost for the first time, details:

  1. I\'m using Visual Studio 2008 SP1
  2. I\'m doing an x64 Build
  3. I\'m using boost:
10条回答
  •  渐次进展
    2020-12-01 16:15

    I came to the question via searching for the linker error plus CMAKE, so I'm adding this comment here in case anyone else finds this question the same way.

    It turns out that the linker error in my case was due to an errant:

        add_definitions(-DBOOST_ALL_DYN_LINK)
    

    in the CMakeLists.txt, which is fine for Unix, but not Windows in my case. The solution is not use that define on Windows.

提交回复
热议问题