Skip to content
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

clang: undefined symbol boost::archive::archive_exception #321

Open
zoharl3 opened this issue Oct 10, 2024 · 2 comments
Open

clang: undefined symbol boost::archive::archive_exception #321

zoharl3 opened this issue Oct 10, 2024 · 2 comments

Comments

@zoharl3
Copy link

zoharl3 commented Oct 10, 2024

https://stackoverflow.com/questions/79073953/clang-undefined-symbol-boostarchivearchive-exception

@sehe
Copy link

sehe commented Oct 10, 2024

Please include the question. Links are not good descriptions.

@zoharl3
Copy link
Author

zoharl3 commented Oct 10, 2024

I'm building the demo from the tutorial

https://www.boost.org/doc/libs/1_85_0/libs/serialization/doc/tutorial.html

I created the project using cmake for VS22 with clang-cl.exe, and the cmakefile.txt has

find_package( Boost REQUIRED COMPONENTS serialization )
if(Boost_FOUND)
    message( "Boost found: ${Boost_INCLUDE_DIRS}" )
    target_include_directories( ${PROJECT_NAME} PRIVATE ${Boost_INCLUDE_DIRS} )
    target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
endif()

and I verified that the project is linked against ..\vcpkg_installed\x64-windows\debug\lib\boost_serialization-vc143-mt-gd-x64-1_85.lib.

I get two linker errors:

lld-link : error : undefined symbol: __declspec(dllimport) public: void __cdecl boost::archive::archive_exception::`vbase dtor'(void)
lld-link : error : undefined symbol: public: void __cdecl boost::archive::archive_exception::`vbase dtor'(void)

When building with cl.exe, there are no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants