boostorg / boostorg/boost_install
Link error with Boost::serialization on Clang+Windows
- Dominant language
- C
- Stars
- 11
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I encountered some issues with `Boost::serialization` with `clang` on `windows`, and the workaround I found was to remove the `INTERFACE_COMPILE_DEFINITIONS`.
The error:
```
lld-link: error: undefined symbol: __declspec(dllimport) public: void __cdecl boost::archive::archive_exception::`vbase dtor'(void)
```
The workaround:
```cmake
# Here we remove the INTERFACE_COMPILE_DEFINITIONS, it was containing "BOOST_SERIALIZATION_NO_LIB;BOOST_SERIALIZATION_DYN_LINK"
set_property(TARGET Boost::serialization PROPERTY INTERFACE_COMPILE_DEFINITIONS)
```
As a side note, it is odd to me that the `INTERFACE_COMPILE_DEFINITIONS` is filled with `BOOST_SERIALIZATION_NO_LIB;BOOST_SERIALIZATION_DYN_LINK`, is that wanted ? I feel like it says "disable automatic linking, but also enable it" ?
Some related discussions and commits:
https://github.com/boostorg/boost_install/commit/258f7866c1cb1e4d1b3aebd0c4db594d373c686c
https://github.com/boostorg/boost_install/issues/54
https://github.com/boostorg/boost_install/issues/62
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.