[Bug c++/42330] undefined reference to "static const int" in class when passing as "const int &" to a function
paolo dot carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Tue Dec 8 09:18:00 GMT 2009
------- Comment #1 from paolo dot carlini at oracle dot com 2009-12-08 09:18 -------
You aren't defining anywhere A::i, just add, after struct A:
const int A::i;
and things will be fine.
*** This bug has been marked as a duplicate of 42101 ***
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42330
More information about the Gcc-bugs
mailing list