Page 1 of 1

c++ code in kernel .. linking problems (___gxx_personality_v

Posted: Mon Nov 18, 2002 12:00 am
by MuteX
Hi All,

I'm trying to do a kernel in c++, and to test the concept i wrote a simple class that would simply print something on screen. Note that the classes are to be used internally and i'll expose the interface in C style. heres what i'v been trying to test do.

extern "C"
{
  void kprintf( const char* p )
  {
      console cn.
      cn.write( p );
      // Or.
      console::write ( pr );
  }
};

but i get this ___gxx_personality_v0 undefined reference when linking code, what is this and how can i get rid of it ? it seems the compiler puts such a symbol in "eh_frame" section .. is there any way to suppress that thing ? or am i missing some concept here ??

thanks .

RE:c++ code in kernel .. linking problems (___gxx_personalit

Posted: Tue Nov 19, 2002 12:00 am
by MuteX
i figured that out myself, i had to sepcify

-fno-exceptions

on the command line to suppress this behaviour. Just thought i should post an update for anyone who is also looking for this kind of problem ..

RE:c++ code in kernel .. linking problems (___gxx_personalit

Posted: Wed Jan 08, 2003 12:00 am
by sharada
thanx it helped me!!!

RE:c++ code in kernel .. linking problems (___gxx_personalit

Posted: Wed Mar 26, 2003 12:00 am
by kamikazed
Thanks, it helped me, too!

RE:c++ code in kernel .. linking problems (___gxx_personalit

Posted: Tue Jan 20, 2004 12:00 am
by hartyl
hehe, helped me as well! (this is an evergreen :)
i think i'll look a further look at the additional commandline-parameters

greets, hartyl