From: kccheng AT hep2 DOT phys DOT sinica DOT edu DOT tw (Kuang-Chun Cheng) Newsgroups: comp.os.msdos.djgpp Subject: STL linker error Date: 6 Nov 1996 21:23:33 GMT Organization: Computing Center, Academia Sinica Lines: 33 Message-ID: <55qvkl$akm@gate.sinica.edu.tw> NNTP-Posting-Host: kccheng AT hep2 DOT phys DOT sinica DOT edu DOT tw To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, I am learning STL by trying the example at Musser's book. I am using djgpp v2. The simple example (example 1-3, p19) #include #include #include #include vector vec(char *s) { vector x; while(*s != '\0') x.push_back(*s++); return x; } int main() { cout << "Using reverse algorithm with a vector" << endl; vector vector1=vec("mark twain"); reverse(vector1.begin(), vector1.end()); assert(vector1 == vec("niawt kram")); } cause a error at link-time as follows, undefined reference to 'operator new (unsigned long, void *)' Anyone know how to fix this problem? Thanks a lot. Kuang-chun Cheng kccheng AT hep2 DOT phys DOT sinica DOT edu DOT tw