You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Create a simple C++/CLI console program using the VS template
2. Add vcpkg support
3. Add abseil dependency
4. Build and observe LNK2005 linker errors
Failure logs
Build started at 14:01...
1>------ Build started: Project: TestVcpkg, Configuration: Debug x64 ------
1>TestVcpkg.cpp
1>.NETFramework,Version=v4.7.2.AssemblyAttributes.cpp
1>Generating Code...
1>TestVcpkg.obj : MSIL module encountered; incremental linking is disabled for MSIL; performing full link
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: __cdecl std::bad_alloc::bad_alloc(class std::bad_alloc const &)" (??0bad_alloc@std@@qeaa@AEBV01@@z) already defined in abseil_dll.lib(abseil_dll.dll)
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: __cdecl std::bad_array_new_length::bad_array_new_length(class std::bad_array_new_length const &)" (??0bad_array_new_length@std@@qeaa@AEBV01@@z) already defined in abseil_dll.lib(abseil_dll.dll)
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: __cdecl std::exception::exception(class std::exception const &)" (??0exception@std@@qeaa@AEBV01@@z) already defined in abseil_dll.lib(abseil_dll.dll)
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: virtual __cdecl std::bad_array_new_length::~bad_array_new_length(void)" (??1bad_array_new_length@std@@UEAA@XZ) already defined in abseil_dll.lib(abseil_dll.dll)
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: virtual char const * __cdecl std::exception::what(void)const " (?what@exception@std@@UEBAPEBDXZ) already defined in abseil_dll.lib(abseil_dll.dll)
1>C:\Code\TestVcpkg\x64\Debug\TestVcpkg.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Done building project "TestVcpkg.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 14:01 and took 02.922 seconds ==========
Additional context
No response
The text was updated successfully, but these errors were encountered:
This is using the x64-windows triplet. I have a minimal repro, just need to figure out how to clean all the vcpkg buildtrees etc. to get the size down enough to share...
Operating system
Windows
Compiler
MSVC
Steps to reproduce the behavior
Failure logs
Build started at 14:01...
1>------ Build started: Project: TestVcpkg, Configuration: Debug x64 ------
1>TestVcpkg.cpp
1>.NETFramework,Version=v4.7.2.AssemblyAttributes.cpp
1>Generating Code...
1>TestVcpkg.obj : MSIL module encountered; incremental linking is disabled for MSIL; performing full link
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: __cdecl std::bad_alloc::bad_alloc(class std::bad_alloc const &)" (??0bad_alloc@std@@qeaa@AEBV01@@z) already defined in abseil_dll.lib(abseil_dll.dll)
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: __cdecl std::bad_array_new_length::bad_array_new_length(class std::bad_array_new_length const &)" (??0bad_array_new_length@std@@qeaa@AEBV01@@z) already defined in abseil_dll.lib(abseil_dll.dll)
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: __cdecl std::exception::exception(class std::exception const &)" (??0exception@std@@qeaa@AEBV01@@z) already defined in abseil_dll.lib(abseil_dll.dll)
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: virtual __cdecl std::bad_array_new_length::~bad_array_new_length(void)" (??1bad_array_new_length@std@@UEAA@XZ) already defined in abseil_dll.lib(abseil_dll.dll)
1>MSVCRTD.lib(throw_bad_alloc.obj) : error LNK2005: "public: virtual char const * __cdecl std::exception::what(void)const " (?what@exception@std@@UEBAPEBDXZ) already defined in abseil_dll.lib(abseil_dll.dll)
1>C:\Code\TestVcpkg\x64\Debug\TestVcpkg.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Done building project "TestVcpkg.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 14:01 and took 02.922 seconds ==========
Additional context
No response
The text was updated successfully, but these errors were encountered: