This is the mail archive of the cygwin 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: exceptions in c++


m r wrote:

> Hi: I'm doing my beginnings in Cygwin and cannot solve
> errors of type
> "undefined reference __gxx_personality...
> "undefined reference __gxa_end_catch...
> etc. when compiling with gcc if I use throw or catch.
> I use -fexceptions, and nothing. Can you help me? Thx.

You haven't given nearly enough information.  Provide the exact commands
that you use to compile and link.  Better would be a small testcase that
demonstrates the error.  It is also useful to provide the cygcheck
output as requested at <http://cygwin.com/problems.html>.

As a wild guess, I'd say you're trying to link by invoking gcc instead
of g++.  You need to link with g++ when compiling C++ code as it will
add all the necessary options, flags, and libraries to support C++ code.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]