Mail Archives: djgpp/2003/11/03/18:01:14
Hello.
nospam AT none DOT com wrote:
>
> Andrew Cottrell <spam AT bigpond DOT com DOT au> wrote:
>
> >>hi, I am encountering a strange problem with the new gpp332b.zip
> >>
> >>c:/devtools/djgpp/tmp/ccmZcG4a.o(.eh_frame+0x11):hello.cpp: undefined
> >>reference to `___gxx_personality_v0'
> >>collect2: ld returned 1 exit status
> >>
> >>i get this with a simple helloworld c++ program.
> > ..snip..
> >>if i rename my helloworld application to a .c filename, then it
> >>compiles fine. it seems like some problem in the c++ compiling.
> >>
> >>has anyone else seen this problem?
> > In the past I have gotten similar errors when I link C++ objects from
> > one compiler with another.
>
> > Check that you downloaded all the relevant GCC 3.3.2 compiler zip
> > files. One way of doing this is to check the gcc3*.mft in the manifest
> > dirrectory and remove the gcc331 (or the previous version) directories
> > from the lib\gcc-lib\djgpp\3.31 and lang\cxx\3.32 directories.
>
> Hi, thanks for the reply.
>
> This is a clean install on a system that never had djgpp installed. I
> downloaded gcc332b.zip and gpp332b.zip, along with the rest of the
> required zip files, set the environment variables, etc... (this one is
> XP)
>
> it didn't work. c code compiled fine, but c++ code didn't.
[snip]
How are you compiling it? You should be using g++. E.g.:
g++ -g -Wall -o helloworld helloworld.cpp
You need to use g++ to link C++ programs - "gcc" isn't enough.
Regards,
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
"You can't evaluate a man by logic alone." -- McCoy, "I, Mudd", Star Trek
- Raw text -