Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
720 Discussions

undefined symbol boost::archive::archive_exception

Zohar
Novice
655 Views
0 Kudos
2 Replies
Alex_Y_Intel
Moderator
450 Views

If you'd like your question to be investigated further, please provide a reproducer and exact reproducing commands so others in the forum can fully understand your issue. 

0 Kudos
Zohar
Novice
389 Views

I'm copying the SO question:

 

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.

clang and icx fail.

 

0 Kudos
Reply