This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Undefined symbols: "Singleton<SingleClass>::ptr", referenced from: __ZN9SingletonI11SingleClassE3ptrE$non_lazy_ptr in ccvXYIGQ.o ld: symbol(s) not found collect2: ld returned 1 exit status
template<class Type> class Singleton { public: static Type *ptr;
protected: Singleton() { ptr = NULL; } ~Singleton() { } };
class SingleClass : public Singleton<SingleClass> { friend class Singleton<SingleClass>; };
// a test //SingleClass * Singleton<SingleClass>::ptr;
int main() {
return(0); }
Attachment:
PGP.sig
Description: This is a digitally signed message part
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |