From: abarak AT iil DOT intel DOT com (Amit Barak) Newsgroups: comp.os.msdos.djgpp Subject: Re: STL and optimalisations Date: 10 Nov 1996 08:31:54 GMT Organization: Intel Israel (74) Ltd. Lines: 50 Message-ID: <5643tq$nbo@www.iil.intel.com> References: <55q2lb$6kn AT info DOT service DOT rug DOT nl> NNTP-Posting-Host: ilx214.iil.intel.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp It seems like you are using gcc instead of gxx, and therefore standard c++ linraries are not linked - and the 'new' operator is not found. your code compiled fine with gxx . also , make sure you have a proper file extension - cxx/cpp/cc Mark Span (span AT PROBLEM_WITH_INEWS_GATEWAY_FILE) wrote: : 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 -- amit barak intel IDC voice: 972-4-865-6010 email: abarak AT iil DOT intel DOT com