LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A C program which was compiled properly in DevCPP is not compiling in Linux-Fedora. (https://www.linuxquestions.org/questions/linux-newbie-8/a-c-program-which-was-compiled-properly-in-devcpp-is-not-compiling-in-linux-fedora-841321/)

varalakshmi 10-30-2010 02:36 AM

A C program which was compiled properly in DevCPP is not compiling in Linux-Fedora.
 
A C program which compiled well in Dev CPP compiler is not compiling in Linux-Fedora.It shows the following error message
/tmp/ccy02C6e.o:(.eh_frame+0x12):undefined reference to '__gxx_personality_v0'
collect2:ld returned 1 exit status

Nylex 10-30-2010 03:21 AM

Can you post the code along with the full command line you're using to compile it, please?

PehJota 10-30-2010 03:37 AM

Well, you haven't posted any code or told us how you're compiling this, so I can only make guesses here.

Quote:

Originally Posted by varalakshmi (Post 4143978)
/tmp/ccy02C6e.o:(.eh_frame+0x12):undefined reference to '__gxx_personality_v0'
collect2:ld returned 1 exit status

This is the linker throwing an error that the symbol '__gxx_personality_v0' hasn't been defined. A Google search for ".eh_frame" reveals to me that it is an exception-handling code section (and exceptions are in C++, not C). A search for "__gxx_personality_v0" shows me that this symbol is indeed exception-related and is defined in libstdc++ of GCC.

So, is this really C code that you're compiling, or is it C++? What command (`gcc` or `g++`) are you using to compile it? If you're using `gcc`, try `g++` instead (as this automatically links in the C++ libraries you need).


All times are GMT -5. The time now is 05:21 AM.