This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem compiling cpp programs with gcc-3.2-1


From: Mark Schoenberg <mark at emmestech dot com>
To: cygwin at cygwin dot com
Date: Mon, 28 Oct 2002 20:51:59 +1900
------------------------------------------------------------------------
--------

>     The problems described below appeared after I upgraded to the
latest
> versions of the cygwin release.  It disappeared when I went back to
gcc-2.95.3,
> leaving all the other utilities at the latest version.  This suggests
to me the
problem lies in gcc-3.2.1, or in how I have it configured.
>
> Why won't
> gcc simp.cpp -o simp
>
> compile the incredibly simple program below without generating
e-messages like
>
> /DOCUME~1/Mark/LOCALS~1/Temp/ccRtp1xR.o(.eh_frame+0x11):simp.cpp:
undefined reference to `___gxx_personality_v0'
> collect2: ld returned 1 exit status
>
>      Why must I replace gcc with g++ or c++ after upgrading from
gcc-2.95.3-5 to
> 3.2.1 ?

The exception handling functions for g++ are in libstdc++.a with version
3.x.  G++ adds libstdc++.a to libraries, GCC does not.

 With 2.9.x the C++ exceptions and new/delete functions  were in
libgcc.a
>
> Are error messages like
>
> /DOCUME~1/Mark/LOCALS~1/Temp/ccBuHJFC.o(.text+0x948):anv.cpp:
undefined .
> reference to `operator new(unsigned)'
> /DOCUME~1/Mark/LOCALS~1/Temp/ccBuHJFC.o(.text+0x979):anv.cpp:
undefined .
> reference to `__cxa_begin_catch'
> /DOCUME~1/Mark/LOCALS~1/Temp/ccBuHJFC.o(.text+0x9a5):anv.cpp:
undefined
> reference to `__cxa_end_catch'
>
> in response to compiling a slightly more complicated cpp program with
gcc
> related, or due to something else?

They are same problem.

> My slightly more complicated program will
> compile if I replace gcc with g++, but the compiled program bombs
immediately.


Could you post "slightly more complicated program". It may relate to
Dwarf2 eh vs Windows messages.

Danny

>
>      Is there a simple fix other than using gcc-2.95.3-5 instead of
3.2-1?>

> Thank you, Mark Schoenberg



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]