WTF ___gxx_personality_v0

Sage
Posts: 1,403
Joined: 2005.07
Post: #1
I keep getting ___gxx_personality_v0 so I rename the files that ALLCAPS.C to allcaps.c and recompile and everything works again.. what the heck?

Does anyone know what ___gxx_personality_v0 is about, and why gcc doesnt like me using/linking with capital letter filenames?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #2
gcc assumes that a file with the extension .C is a C++ source file, in case that makes a difference. Lower casing the extension changes its default language to C.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
Oh thats got to be it, seems odd to have C mean C++ though :|.
Oh well confusion over, thank you.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #4
It would have still worked... if you used g++ instead of gcc. Rasp g++ is essentially gcc with extra flags passed in so it links the correct libraries for C++. IIRC, the possible file extensions for C++ are .C, .cpp, and .c++. (of course, some people use regular .c, such as my professor about a year and a half ago, which caused me some troubles when working on programming assignments since it would defautl to C)
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
akb825 Wrote:It would have still worked... if you used g++ instead of gcc.

I though that as well but when I did a replace gcc/g++ in my makefile and recompiled and got the exact same errors as before I thought of changing the capital letters in the filename to lowercase.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #6
I just ran a simple test, renaming a .c file .C, and as I thought, it only gave me that error when using gcc. Are you sure you replaced every gcc with g++?
Quote this message in a reply
Post Reply