Home > Just Learnt Something New (JLSN) > gcc error – undefined reference to `__gxx_personality_v0′

gcc error – undefined reference to `__gxx_personality_v0′

Problem:
Got the following error when compiling c program.

$gcc mydice.cc -o dice
/tmp/cc4uHuB6.o:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0′
collect2: error: ld returned 1 exit status

My version of gcc

Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)

Solution:
Turns out that I was using the wrong file extension.
Once I changed it to mydice.c my problem was solved.

This page (below) gives a fairly good reason as to why I was getting the error.
http://todayslearnings.blogspot.com/2007/12/undefined-reference-to-gxxpersonalityv0.html


Source:

https://www.linuxquestions.org/questions/programming-9/gcc-compiler-error-while-compiling-*-c-file-914284/
https://ubuntuforums.org/showthread.php?t=474537

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: