简体   繁体   English

MSYS2 MinGW在构建大型应用程序时奇怪的多重定义boost::exception_detail::clone_impl

[英]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.我正在尝试构建一个相当大的应用程序,该应用程序可以在带有 MSYS2 的 Linux 上正常工作。 I've almost got it to build but I'm now getting a pretty odd linker error:我几乎可以构建它,但我现在遇到了一个非常奇怪的 linker 错误:

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.该错误与boost::exception_detail::clone_impl的多个定义有关,项目中使用了 boost,但从未直接使用任何 boost 异常的东西。

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 here
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 `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
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 `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 ). (它提到的对象在任何地方都没有直接使用 boost - 除了使用boost::iequals的一行)。

What could cause this?什么可能导致这种情况? I don't really know what clone_impl is or why I'd have duplicates of it.我真的不知道 clone_impl 是什么,也不知道为什么要复制它。 It seems MinGW specific.似乎是 MinGW 特有的。

I faced a similar issue when using MinGW and Code::Blocks.我在使用 MinGW 和 Code::Blocks 时遇到了类似的问题。 Rebuilding the project solved that problem for me.重建项目为我解决了这个问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 提高:: exception_detail :: clone_impl <boost::exception_detail::error_info_injector<boost::thread_resource_error> &gt; - boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> > “推动:: exception_detail :: clone_impl <boost::exception_detail::error_info_injector<boost::system::system_error> &gt; - 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> > cpp-netlib问题,在抛出&#39;boost :: exception_detail :: clone_impl实例后终止终止 - cpp-netlib issue, terminate called after throwing an instance of 'boost::exception_detail::clone_impl 迁移到 MSYS2/MinGW64 时 Header 路径不匹配 - Header paths mismatch when migrating to MSYS2/MinGW64 使用msys2构建OpenBlas - Building OpenBlas with msys2 在msys下构建boost,找不到mingw.jam - Building boost under msys, can't find mingw.jam 应用程序在mingw-w64 / msys2中编译,“应用程序无法正确启动(0xc00007b” - Application compiled in mingw-w64/msys2, “the application was unable to start correctly (0xc00007b” 调试使用mingw / msys2构建的Windows服务 - Debugging Windows service built with mingw/msys2 尝试在 MSYS2/MinGW-w64 上编译时,许多内部标准库编译错误 - Many internal std library compile errors when trying to compile on MSYS2/MinGW-w64 在64位Windows 7(msys2 / mingw64)上构建GMP 6.1.0:由于mp_limb_t不是64位,配置失败 - Building GMP 6.1.0 on 64 bit Windows 7 (msys2/mingw64): configure fails due to mp_limb_t is not 64 bits
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM