Message-Id: <199809091813.UAA27462@ieva06.lanet.lv> From: "Andris Pavenis" To: djgpp AT delorie DOT com Date: Wed, 9 Sep 1998 20:18:00 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: (gcc Newbie Q again) loads of "undefined reference to foo class" errors In-reply-to: <01bddbf6$7823ece0$LocalHost@jonadab> Precedence: bulk From: "Jonadab the Unsightly One" Subject: (gcc Newbie Q again) loads of "undefined reference to foo class" errors Date sent: 9 Sep 1998 13:33:03 GMT Organization: Belly Laugh Software To: djgpp AT delorie DOT com > *LOL*. > > My previous problem with include involved my > failure to install correctly the C++ libraries. Since I > am having that same problem with gcc under Debian, > I'll have to go back and check with dselect to see > if my installation is somehow wrong there, too. > > Anyway, now I'm back, hopefully with something marginally less stupid. > > I am getting an error message repeated many times > (undefined reference) and I have no idea what it means. > Might this still mean I haven't properly installed yet, > or is there some other problem I'm missing? > > Here's my source again, with one correction: > Looks like You have old libgcc.a in e:/a/djgpp/lib (from gcc-2.7.2.1). If You are changing to gcc-2.8.1 You should delete it. > > #include > > void main () > { > cout << "Hello, World!\n"; > } > > And the results: > > > cd D:\c > > E:\A\DJGPP\BIN\Gcc.exe -v -x c++ D:\C\HELLOW.CPP -o D:\C\HELLOW.exe > -lstdcxx > > E:\A\DJGPP\BIN\Gcc.exe -v -x c++ D:\C\HELLOW.CPP -o D:\C\HELLOW.exe > -lstdcxx > Reading specs from e:/a/djgpp/lib/specs > gcc version 2.8.1 > e:/a/djgpp/lib/gcc-lib/djgpp/2.81/cpp.exe -lang-c++ -v -undef -D__GNUC__=2 > -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=8 -Dunix -Di386 -DGO32 -DMSDOS > -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ > -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS > -D__DJGPP=2 -D__DJGPP_MINOR=1 -D__EXCEPTIONS D:\C\HELLOW.CPP > e:/a/djgpp/tmp/ccaywdse > GNU CPP version 2.8.1 (80386, BSD syntax) > #include "..." search starts here: > #include <...> search starts here: > e:/a/djgpp/lang/cxx > e:/a/djgpp/include > e:/a/djgpp/lang/cxx > e:/a/djgpp/lib/gcc-lib/djgpp/2.81/include > e:/a/djgpp/include > End of search list. > e:/a/djgpp/lib/gcc-lib/djgpp/2.81/cc1plus.exe e:/a/djgpp/tmp/ccaywdse > -quiet -dumpbase D:\C\HELLOW.cc -version -o e:/a/djgpp/tmp/ccbywdse > GNU C++ version 2.8.1 (djgpp) compiled by GNU C version 2.8.1. > e:/a/djgpp/bin/as.exe -o e:/a/djgpp/tmp/cccywdse e:/a/djgpp/tmp/ccbywdse > e:/a/djgpp/bin/ld.exe -o D:\C\HELLOW.exe e:/a/djgpp/lib/crt0.o > -Le:/a/djgpp/lib -Le:/a/djgpp/lib/gcc-lib/djgpp/2.81 -Le:/a/djgpp/lib > e:/a/djgpp/tmp/cccywdse -lstdcxx -Tdjgpp.djl -lgcc -lc -lgcc > e:/a/djgpp/lib/libstdcxx.a(iostream.o)(.text+0x1b9d):iostream.cc: undefined > reference to `__rtti_class' > e:/a/djgpp/lib/libstdcxx.a(iostream.o)(.text+0x1cdd):iostream.cc: undefined > reference to `__rtti_class' > e:/a/djgpp/lib/libstdcxx.a(iostream.o)(.text+0x1f4e):iostream.cc: undefined > reference to `__rtti_class' > e:/a/djgpp/lib/libstdcxx.a(iostream.o)(.text+0x2565):iostream.cc: undefined > reference to `__rtti_class' > e:/a/djgpp/lib/libstdcxx.a(iostream.o)(.text+0x28b9):iostream.cc: undefined > reference to `__rtti_class'