By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,949 Members | 2,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,949 IT Pros & Developers. It's quick & easy.

GCC linker throws weird message.

P: n/a
I am compiling with GCC 3.2, and it works well enough. However,
sometimes when I try to link libraries, the linker throws
"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'". This never happened until about 3 days ago.

What is __gxx_personality_v0? The linker works for many libraries,
such as stdlib.h, strings.h, etc. However, sometimes it fails. In
this particular case, "signals.h" is causing the trouble. In other
times, "setjump.h", "gmp.h", and some other libraries cause the linker
to throw the error.

Does anyone know why GCC is doing this?

Thanks.

Nov 14 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Steven wrote:
I am compiling with GCC 3.2, and it works well enough. However,
sometimes when I try to link libraries, the linker throws
"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'". This never happened until about 3 days ago.


Not a C question. Try gnu.gcc.help. "gxx" suggests C++ to me,
though I could be wrong.

Allin Cottrell
Nov 14 '05 #2

P: n/a

"Steven" <so******************@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am compiling with GCC 3.2, and it works well enough. However,
sometimes when I try to link libraries, the linker throws
"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'". This never happened until about 3 days ago.

Does anyone know why GCC is doing this?

gcc detects C++ code where you have told it to link only C library support.
Nov 14 '05 #3

P: n/a
Tim Prince wrote:
"Steven" <so******************@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am compiling with GCC 3.2, and it works well enough. However,
sometimes when I try to link libraries, the linker throws
"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'". This never happened until about 3 days ago.

Does anyone know why GCC is doing this?
gcc detects C++ code where you have told it to link only C library support.

man gcc

Nov 14 '05 #4

P: n/a
Rex
because your filename is in UPPER CASE gcc is treating it as a C++
source. rename extension to lower case (.c instead of .C) and it should
work.

Nov 14 '05 #5

P: n/a
Rex wrote:
because your filename is in UPPER CASE gcc is treating it as a C++
source. rename extension to lower case (.c instead of .C) and it should
work.


The error message was:

"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'".

Ahh, that's *very* clear!!!!!

What a clear error message. I am really impressed!
Nov 14 '05 #6

P: n/a
jacob navia wrote:
The error message was:

"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'".

Ahh, that's *very* clear!!!!!

What a clear error message. I am really impressed!


Well, once you put your thinking cap on, the reference to
"NOTAD.C" is fairly self-explanatory. Someone has ported
source files from a case-insensitive OS to a case-sensitive
one without paying attention, and has paid the price.

Allin Cottrell
Nov 14 '05 #7

P: n/a

"Tim Prince" <tp*****@nospamcomputer.org> wrote in message
news:ZC*****************@newssvr13.news.prodigy.co m...

"Steven" <so******************@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am compiling with GCC 3.2, and it works well enough. However,
sometimes when I try to link libraries, the linker throws
"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'". This never happened until about 3 days ago.

Does anyone know why GCC is doing this?

gcc detects C++ code where you have told it to link only C library
support.

The real problem is that you are referencing an item in your source code
that the linker can't find to link in. This could be for a number of
reasons. Wrong case, currupt object files, misspelling, etc.
Nov 14 '05 #8

P: n/a

"DHOLLINGSWORTH2" <DH*************@cox.net> wrote in message
news:8GTTd.18543$yr.1692@okepread05...

"Tim Prince" <tp*****@nospamcomputer.org> wrote in message
news:ZC*****************@newssvr13.news.prodigy.co m...

"Steven" <so******************@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am compiling with GCC 3.2, and it works well enough. However,
sometimes when I try to link libraries, the linker throws
"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'". This never happened until about 3 days ago.

Does anyone know why GCC is doing this?

gcc detects C++ code where you have told it to link only C library
support.

The real problem is that you are referencing an item in your source code
that the linker can't find to link in. This could be for a number of
reasons. Wrong case, currupt object files, misspelling, etc.

As a previous reply pointed out, gcc treats .C as denoting c++ code,
regardless of OS or contents of the source file.
Nov 14 '05 #9

P: n/a
[snips]

On Fri, 25 Feb 2005 19:21:31 +0100, jacob navia wrote:
The error message was:

"NOTAD.o(.eh_frame+0x11):NOTAD.C: undefined reference to
`__gxx_personality_v0'".

Ahh, that's *very* clear!!!!!

What a clear error message. I am really impressed!


It doesn't really need to be clear. There's really only two ways that I
can see that you'd get the error; one is to screw up the compilation, the
other is if you somehow mucked up your link or environment so badly that
the linker couldn't find libstdc++.

In the first case, it's a user error, trying to compile C code in C++
mode, but without the requisite options - or using the proper compiler
frontend - and in the second, it's liable to also include umpteen other,
more useful diagnostics.
Nov 14 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.