Date: Wed, 24 Jul 1996 07:58:38 +0200 (IST) From: Eli Zaretskii To: jonah lee Cc: djgpp AT delorie DOT com Subject: Re: link error in STL example code with djgpp 2.7.2 In-Reply-To: <4t36as$6o2@news.alaska.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 23 Jul 1996, jonah lee wrote: > While compiling one of the STL example code from ObjectSpace using > djgpp 2.7.2 in DOS7 of Win95, I have an error in linking (with output shown > below): > ----------- > vec1.cc(.text+0xb9f): undefined reference to `operator new(unsigned long, > void *)' [snip] > gxx -v ..\vec1.cpp Try to do this: gxx -v ..\vec1.cpp -lstdcx Did it help? If so, the problem is that the externals you miss are in the libstdcx.a library (the STL), which gxx currently doesn't scan by default (it should do this; to be corrected in the next releases). > e:/djgpp/bin\ld.exe e:/djgpp/lib\crt0.o -Le:/djgpp/lib > -L/usr/local/lib e:/djgpp/tmp\ccdaaaaa -lgpp -lm -Tdjgpp.lnk > -lgcc -lc -lgcc If the above doesn't help, then what kind of disk is E:? Is it by any chance a Novell networked drive? If so, there is a known problem with the library `stat' function that prevents `ld' from finding libraries which are on such drives. A work-around is to put all the libraries on a local drive (this will be also corrected in the next release).