public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* What is "__gxx_personality_sj0"?
       [not found] <AANLkTikKGxE_fp3q9JrkQC5vG3zaqrvimNi+GOMLnhjY@mail.gmail.com>
@ 2011-02-22 10:24 ` Tihomir Mitkov
  2011-02-22 19:18   ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Tihomir Mitkov @ 2011-02-22 10:24 UTC (permalink / raw)
  To: gcc

I'm trying to compile a program with a library downloaded from
internet (Regular Expression implementation). I compile both my code
and the library with mingw gcc 4.4.3 with no problem. When I try to
link the library with my app `ld' complains about undefined references
to `__gxx_personality_sj0' , `std::allocator<char>
>::basic_string(std::string const&)',  `_Unwind_SjLj_Unregister' and
some others. The error messages are many (probably hundreds).
According to what I have found in the Internet these errors come when
attempting to link object files compiled with different versions of
gcc. But I compiled them with only one and I used the `ld' that comes
with mingw.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What is "__gxx_personality_sj0"?
  2011-02-22 10:24 ` What is "__gxx_personality_sj0"? Tihomir Mitkov
@ 2011-02-22 19:18   ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2011-02-22 19:18 UTC (permalink / raw)
  To: Tihomir Mitkov; +Cc: gcc

On 22 February 2011 10:02, Tihomir Mitkov wrote:
> I'm trying to compile a program with a library downloaded from
> internet (Regular Expression implementation). I compile both my code
> and the library with mingw gcc 4.4.3 with no problem. When I try to
> link the library with my app `ld' complains about undefined references
> to `__gxx_personality_sj0' , `std::allocator<char>
>>::basic_string(std::string const&)',  `_Unwind_SjLj_Unregister' and
> some others. The error messages are many (probably hundreds).

Your question is off-topic for this list, please send requests for
help using or building gcc to gcc-help@gcc.gnu.org. Please take any
follow-up questions to that list, thanks.

> According to what I have found in the Internet these errors come when
> attempting to link object files compiled with different versions of
> gcc. But I compiled them with only one and I used the `ld' that comes
> with mingw.

No, it sounds as though you're trying to use the 'gcc' program to
build C++ code.  That will compile the code, but will not link to the
C++ runtime library, which causes the linker errors you're getting.

This is documented in the manual, which you should read:
http://gcc.gnu.org/onlinedocs/gcc-4.4.5/gcc/Invoking-G_002b_002b.html

The easiest solution to your problem is probably to use 'g++' for C++
programs instead of 'gcc'

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-22 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTikKGxE_fp3q9JrkQC5vG3zaqrvimNi+GOMLnhjY@mail.gmail.com>
2011-02-22 10:24 ` What is "__gxx_personality_sj0"? Tihomir Mitkov
2011-02-22 19:18   ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).