This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51665] undefined reference when passing static const int member to template method
- From: "gcc-bugzilla at bluespirit dot la" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Dec 2011 13:38:22 +0000
- Subject: [Bug c++/51665] undefined reference when passing static const int member to template method
- Auto-submitted: auto-generated
- References: <bug-51665-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51665
--- Comment #1 from Karl Krach <gcc-bugzilla at bluespirit dot la> 2011-12-23 13:38:22 UTC ---
g++ *.cpp --save-temps
MyClass.o:MyClass.cpp:function MyClass::doSomething(): error: undefined
reference to 'MyClass::M_SOME_CONSTANT'
collect2: ld returned 1 exit status