From: span AT PROBLEM_WITH_INEWS_GATEWAY_FILE (Mark Span) Newsgroups: comp.os.msdos.djgpp Subject: STL and optimalisations Date: 6 Nov 1996 13:08:59 GMT Organization: Rijksuniversiteit Groningen Lines: 38 Message-ID: <55q2lb$6kn@info.service.rug.nl> NNTP-Posting-Host: tcw2.ppsw.rug.nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I am new to STL and have run into a problem, and the only thing I can think of is a bug in djgpp.\ from my head: (I use a mac now) #include int main( int argc, char** argv ) { vector*> v; // fill the vector with vector*'s // .. rest of program } What I am trying to do: make a Matrix by creating a vector of vectors. when compiling (from rhide) I get the following link time error: undefined symbol: new(unsigned long, void*) (again, from my head) in 'new.h' this function IS defined and implemented. when this function is placed before 'main' in my source, cut and pastewize, I get the following compile-time error: ;doubly defined function: new(unsigned long, void*) new.h: this is the previous definition. so I took that out again. Now for the mistery: when compiled with -O2, no error is generated, and all is well. So what's my problem, I hear you ask. Well, I'm a curious person and I wonder: what happened? and more general: how would you implement a matrix using STL? and do you have some example code for it. (maybe I'm on the wrong track anyway) Thanks