Quantcast
Viewing all articles
Browse latest Browse all 22090

MSYS2 MinGW strange multiple definition of boost::exception_detail::clone_impl when building large application

I'm trying to build a fairly large application that works fine on Linux with MSYS2. I've almost got it to build but I'm now getting a pretty odd linker error:

The error is something about having multiple definitions of boost::exception_detail::clone_impl, boost is used in the project but no boost exception stuff is never directly used.

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: feedback.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev[_ZTv0_n40_N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev]+0x0): multiple definition of `boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >::~clone_impl()'; api.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev[_ZThn64_N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev]+0x0): first defined hereC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: feedback.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev[_ZTv0_n40_N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev]+0x0): multiple definition of `virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >::~clone_impl()'; api.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev[_ZThn64_N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev]+0x0): first defined hereC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: feedback.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev[_ZTv0_n40_N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev]+0x0): multiple definition of `non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >::~clone_impl()'; api.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev[_ZThn64_N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_6system12system_errorEEEED1Ev]+0x0): first defined here

(the objects it mentions don't directly use boost anywhere -- except for one line that uses boost::iequals).

What could cause this? I don't really know what clone_impl is or why I'd have duplicates of it. It seems MinGW specific.


Viewing all articles
Browse latest Browse all 22090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>