Mail Archives: djgpp/1996/07/18/20:56:09
Reply to message 5646422 from X-AES AT TELELOG on 07/18/96 4:21AM
>I am trying to get started with a little modern hacking, using the
>string and listclasses that come with gcc, but when compiling the
>following code (I use gpp) I get a message looking like:
>
>"unresolved symbol new(int, void)"
>
>Nothing about missing files or so.I managed to nuke the docs, so I
>haven't had the possibility to consult them, any hints? ideas what I
>have done wrong?
First, make sure that you are actually writing in C++ (i.e, your files are
called *.cc or *.cpp or something). new is only a feature of C++.
Second, you must link the C++ library when you compile. It's called
'libgpp.a', and you have to link it with the -l command, like so:
gcc [blah] -o foo.exe foo.cc -lgpp
-lxxx causes the library named libxxx.a to be linked at compile time.
If you don't like doing that every time, use 'gxx' that comes with
gcc272b.zip dated Feb. 22 or later. It does everything required to
compile C++ programs for you, such as linking the class libraries.
BTW, all this is in the FAQ (faq201b.zip), which answers zillions of the
most common questions new users of DJGPP ask. You really
should get it and read at least the first 4 chapters. (Use the info
program in txi360b.zip to view it.)
John
- Raw text -