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

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

    If you use boost::system in your project, you should use and appoint the x86 or x64 version of boost::system lib.

    You can recompile Boost library with the following batch file. Save these to the Boost root folder and run it in CMD Windows (don't double click!):

    call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86
    
    
    cd boost_1_60_0
    call bootstrap.bat
    
    rem Most libraries can be static libraries
    b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/x64
    b2 -j8 toolset=msvc-14.0 address-model=32 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/win32
    
    pause
    

    For more details, you can see this article: https://studiofreya.com/2015/12/19/how-to-build-boost-1-60-with-visual-studio-2015/

提交回复
热议问题