Linker error, Windows 7, one specific function from one specific library
I’m trying to get the boost 1.55 regression tests to build on my Windows machine (msvc-10.0), and nearly all of them build fine but a few of them: pool.pool_msvc_compiler_bug_test pool.test_bug_1252 pool.test_bug_2696 pool.test_bug_3349 pool.test_bug_4960 pool.test_bug_5526 pool.test_msvc_mem_leak_detect pool.test_pool_alloc pool.test_simple_seg_storage pool.time_pool_alloc Give this error : pool_msvc_compiler_bug_test.obj : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'posix_category''(void)" (??__Eposix_category@system@boost@@YAXXZ) pool_msvc_compiler_bug_test.obj : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'native_ecat''(void)" (??__Enative_ecat@system@boost@@YAXXZ) If my libraries were completely wrong, I would expect everything to fail, and many more unresolved symbols, but it’s just this one symbol that is confusing the linker. The command line I’m using to build these tests is: b2 toolset=msvc-10.0 --without-mpi --build-dir=C:\temp address-model=64 variant=release link=static threading=multi --dump-tests test_bug_1252 Which compares favorably with the command lines I’m using to build the libraries: b2 -j4 --without-mpi --stagedir=C:\temp\boost\build\stage --build-dir=C:\temp\boost\build toolset=msvc-10.0 address-model=64 variant=release link=static threading=multi b2 -j4 --without-mpi --prefix=C:\temp\boost\install --stagedir=C:\temp\boost\build\stage --libdir=C:\temp\boost\install\lib --build-dir=C:\temp\boost\build --build-type=complete toolset=msvc-10.0 address-model=64 variant=release link=static threading=multi install b2 -j4 --with-math --stagedir=C:\temp\boost\build\stage --build-dir=C:\temp\boost\build --build-type=complete toolset=msvc-10.0 address-model=64 variant=release link=static threading=multi b2 -j4 --with-math --prefix=C:\temp\boost\install --stagedir=C:\temp\boost\build\stage --libdir=C:\temp\boost\install\lib --build-dir=C:\temp\boost\build --build-type=complete toolset=msvc-10.0 address-model=64 variant=release link=static threading=multi install I inherited the build scripts, so I’m not sure why b2 is being called 4 times, is that a problem? Should I merge the “--without-mpi” into calls 3 and 4, and get rid of calls 1 and 2? Why is it having trouble with just this one symbol? Thanks, Chris
Chris Cooper
Why is it having trouble with just this one symbol?
Should be fixed in develop, a dependency on Boost.System was missing: https://github.com/boostorg/pool/commit/e4 852e2294e942730091d1044716d3797c7bf2a3
participants (2)
-
Chris Cooper
-
Marcel Raad