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

前端 未结 10 2249
执念已碎
执念已碎 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:32

    I solved the problem. I had built 32-bit libraries when I had intended to build 64-bit libraries. I fixed up my build statement, and built 64-bit libraries, and now it works.

    Here is my bjam command line:

    C:\Program Files (x86)\boost\boost_1_38>bjam --build-dir=c:\boost --build-type=complete --toolset=msvc-9.0 address-model=64 architecture=x86 --with-system
    
    0 讨论(0)
  • 2020-12-01 16:33

    I needed both versions and used stage target, so I used --stagedir=./stageX86 for x86 version and the default ./stage for x64

    0 讨论(0)
  • 2020-12-01 16:35

    You need to link in the boost_system library

    0 讨论(0)
  • 2020-12-01 16:39

    I also came here from for this linker error plus CMake, but in my case it was the fact that CMake by default will try to build with 32bit by default. This was fixed by specifying -Ax64

    cmake -Ax64 {path to CMakeLists.txt}
    
    0 讨论(0)
提交回复
热议问题