/tmp/ccEoODxU.o:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'collect2: ld returned 1 exit status

Are you compiling this using g++ instead of gcc? I think that's the cause of this...