www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/09/10:45:38

From: "Jonadab the Unsightly One" <jonadab AT zerospam DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: (gcc Newbie Q again) loads of "undefined reference to foo class" errors
Date: 9 Sep 1998 13:33:03 GMT
Organization: Belly Laugh Software
Lines: 122
Message-ID: <01bddbf6$7823ece0$LocalHost@jonadab>
NNTP-Posting-Host: craw1-cs-4.dial.bright.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

*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:


#include <iostream.h>

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'
e:/a/djgpp/lib/libstdcxx.a(streambuf.o)(.text+0x703):streambuf.cc:
undefined reference to `__rtti_si'
e:/a/djgpp/lib/libstdcxx.a(streambuf.o)(.text+0xb97):streambuf.cc:
undefined reference to `__rtti_si'
e:/a/djgpp/lib/libstdcxx.a(streambuf.o)(.text+0xe23):streambuf.cc:
undefined reference to `__rtti_si'
e:/a/djgpp/lib/libstdcxx.a(streambuf.o)(.text+0xe55):streambuf.cc:
undefined reference to `__rtti_user'
e:/a/djgpp/lib/libstdcxx.a(streambuf.o)(.text+0xe85):streambuf.cc:
undefined reference to `__rtti_user'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0x46):filebuf.cc: undefined
reference to `__eh_pc'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0x4f):filebuf.cc: undefined
reference to `__throw'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0x55):filebuf.cc: undefined
reference to `terminate(void)'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0xa6):filebuf.cc: undefined
reference to `__eh_pc'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0xaf):filebuf.cc: undefined
reference to `__throw'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0xb5):filebuf.cc: undefined
reference to `terminate(void)'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0x116):filebuf.cc: undefined
reference to `__eh_pc'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0x11f):filebuf.cc: undefined
reference to `__throw'
e:/a/djgpp/lib/libstdcxx.a(filebuf.o)(.text+0x125):filebuf.cc: undefined
reference to `terminate(void)'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x46):stdiostream.cc:
undefined reference to `__eh_pc'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x4f):stdiostream.cc:
undefined reference to `__throw'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x55):stdiostream.cc:
undefined reference to `terminate(void)'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x4ad):stdiostream.cc:
undefined reference to `__eh_pc'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x4b6):stdiostream.cc:
undefined reference to `__throw'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x4bd):stdiostream.cc:
undefined reference to `terminate(void)'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x509):stdiostream.cc:
undefined reference to `__rtti_class'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x7d1):stdiostream.cc:
undefined reference to `__eh_pc'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x7da):stdiostream.cc:
undefined reference to `__throw'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x7e1):stdiostream.cc:
undefined reference to `terminate(void)'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x82d):stdiostream.cc:
undefined reference to `__rtti_class'
e:/a/djgpp/lib/libstdcxx.a(stdiostream.o)(.text+0x96f):stdiostream.cc:
undefined reference to `__rtti_si'

-- 
Dyslexic email address:  ten DOT thgirb AT badanoj

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019