Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linking errors -- " multiple definition of `std::exception::~exception()' " #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neroist
Copy link

@neroist neroist commented May 20, 2024

When attempting to compile & run the examples I keep running into this error:

Hint:  [Link]
c:/users/xxx/.choosenim/toolchains/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
c:/users/xxx/.choosenim/toolchains/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../lib\libstdc++.a(eh_exception.o):
(.text$_ZNSt9exceptionD2Ev+0x0): multiple definition of `std::exception::~exception()';
c:/users/xxx/.choosenim/toolchains/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../lib/libstdc++.dll.a(d005338.o):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status

Putting {.passL: "-static".} in there seems to fix things (similar fix for uing, but -static-libgcc and -static-libstdc++ aren't needed ime)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant