This is a second-hand question from an OS development site, but it made me curious since I couldn't find a decent explanation anywhere.
When compiling and linking a free-standing C++ program using gcc, sometimes a linker error like this occurs:
out/kernel.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
This is apparently because this symbol is defined in libstdc++, which is missing in a free-standing environment. Fixing the problem simply requires defining this symbol somewhere:
void *__gxx_personality_v0;
Which is nice, but I don't like things that just magically work... So the question is, what is the purpose of this symbol?
msys2 msys
version of clang++, I tried defining this symbol in main.cpp and it did not resolve the problem - it lead to a different error:clang++: error: clang frontend command failed due to signal (use -v to see invocation)
. – Vinavinaceous