Well, you haven't posted any code or told us how you're compiling this, so I can only make guesses here.
Originally Posted by varalakshmi
/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).