-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boost\libs\pool\test failed due to link error on MSVC #34
Comments
I too am having a similar issue when statically linking boost::serialization to my application: cmake_pch.obj : error LNK2019: unresolved external symbol "public: __cdecl boost::archive::codecvt_null<wchar_t>::codecvt_null<wchar_t>(unsigned __int64)" (??0?$codecvt_null@_W@archive@boost@@qeaa@_K@Z) referenced in function "public: v I have tried building Boost 1.74.0 and 1.73.0 with ICU (1.67_1) support on Windows using MSVC2019 and then statically linking to my application. It would seem that sometime after Boost 1.70.0 symbol visibility was tinkered with. |
I have the similar issue as @MichaelAnthonyP96 mentioned. The environment is:
The part of adding boost libs in cmake: # Add boost library
# Reference: https://github.com/Microsoft/vcpkg/issues/4188
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(BOOST 76.0 REQUIRED COMPONENTS test serialization)
find_path(BOOST_INCLUDE_DIR boost)
include_directories(${BOOST_INCLUDE_DIR})
target_link_libraries(TinyDIP Boost::boost ${BOOST_LIBRARIES}) |
|
Issue description:
Found Boost\libs\pool\test boostorg/boost@38d8e0e link error in a future release of MSVC. Could you please take a look?
Reproduce steps:
ErrorMessage:
Creating library .\pool_msvc_compiler_bug_test.lib and object .\pool_msvc_compiler_bug_test.exp
pool_msvc_compiler_bug_test.obj : error LNK2019: unresolved external symbol "public: __cdecl boost::archive::codecvt_null<wchar_t>::codecvt_null<wchar_t>(unsigned __int64)" (??0?$codecvt_null@_W@archive@boost@@qeaa@_K@Z) referenced in function "public: void __cdecl boost::archive::codecvt_null<wchar_t>::`default constructor closure'(void)" (??_F?$codecvt_null@_W@archive@boost@@QEAAXXZ)
.\pool_msvc_compiler_bug_test.exe : fatal error LNK1120: 1 unresolved externals
The text was updated successfully, but these errors were encountered: