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

Multiple definition of type_info #40

Closed
EthanZoneCoding opened this issue Oct 8, 2023 · 3 comments
Closed

Multiple definition of type_info #40

EthanZoneCoding opened this issue Oct 8, 2023 · 3 comments

Comments

@EthanZoneCoding
Copy link

Since the update 2 days ago, I get multiple definition errors when linking. I'm using CLion and cmake 3.26 with C++ 23. pulling the repo like in the example.

C:\Program Files\JetBrains\CLion 2023.2.1\bin\mingw\bin/ld.exe: C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0\libstdc++.a(tinfo.o):(.text$_ZNKSt9type_infoeqERKS_+0x0): multiple definition of `std::type_info::operator==(std::type_info const&) const'; _deps/safetyhook-build/libsafetyhook.a(vmt_hook.cpp.obj):C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/typeinfo:194: first defined here

After a bit of research, this seems to be an issue with static linking in C++ 23.
skeeto/w64devkit#86
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110572

@cursey
Copy link
Owner

cursey commented Oct 12, 2023

Maybe I'm not understanding the issue fully as I don't typically use mingw but is this a problem with GCC or something I need to fix in safetyhook because it's wrong? If it's a problem with GCC I don't mind working around the issue by making a change, but only if necessary. If there's an actual problem with safetyhook though, then I definitely want to address it.

@EthanZoneCoding
Copy link
Author

I'll look at the code introduced with the new commit to try to narrow down the issue. Thanks

@EthanZoneCoding
Copy link
Author

I moved to MSVC compiler, and the release works. The new workflow is better, I'm not looking back so I'm closing this for now. Maybe if someone else sees it, they can open it. Thanks, I love this library

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

No branches or pull requests

2 participants