[Bug other/61549] Error when linking with shared libraries
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 18 11:17:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61549
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
You are violating the one-definition-rule (ODR) of C++. It's undefined if
two same classes have different implementations.
Put them in anonymous namespaces and it'll work.
More information about the Gcc-bugs
mailing list