Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-22-2009, 10:35 AM   #1
LQ Newbie
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
Question undefined reference to '__gxx_personality_v0'

I'v tried to compile a small test program with cc/gcc
but I'v got the following error:
/tmp/ccD16111.o<.eh_frame+0x11>: undefined reference to '__gxx_personality_v0' collect2: ld command 1 exit status

I did EXACTLY as in the book.
What can I do ????????


int main(){ 

    return 0; 

Old 03-22-2009, 11:16 AM   #2
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 41
I guess that your file-suffix is .cpp, right?
And not simply .c, although this is C, and not C++.

Try running g++ instead of gcc, then it should also work with .cpp as suffix.

For some reason gcc doesn't get it right by itself when using the .cpp-suffix and gives this error.

Just tested your code as test.c and test.cpp.
gcc test.c -> works
gcc test.cpp -> does not work
g++ test.c -> works
g++ test.cpp -> works


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined reference, why? george_mercury Programming 4 05-07-2009 01:15 AM
undefined symbol: __gxx_personality_v0 yll Programming 2 02-05-2008 10:53 AM
undefined reference to.... crapodino Programming 1 01-13-2008 08:05 PM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 04:01 AM
undefined reference mp4-10 Programming 3 01-25-2005 01:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration