Mail Archives: djgpp/1996/11/10/08:09:56
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 <stl.h>
:
: int main( int argc, char** argv )
: {
: vector<vector<double>*> v;
: // fill the vector with vector<double>*'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
- Raw text -