* -nodefaultlibs and gxx_personality
@ 2007-05-14 3:04 Ivan Novick
2007-05-14 18:23 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Novick @ 2007-05-14 3:04 UTC (permalink / raw)
To: gcc-help
Hi,
I am trying to use -nodefaultlibs to exclude libstdc++
but something is trying to call `__gxx_personality_v0'
which is in libstdc++. How can one compile a simple
C++ program without linking against libstdc++?
$ cat test.cpp
#include <stdio.h>
int main(int argc, char** argv)
{
printf("Hello World\n");
return 0;
}
$ g++ -nodefaultlibs test.cpp -lgcc_s -lgcc -lc
-lgcc_s -lgcc -o tester
/tmp/ccokT7Gw.o:(.eh_frame+0x11): undefined reference
to `__gxx_personality_v0'
Thank you,
ivan@0x4849.net
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: -nodefaultlibs and gxx_personality
2007-05-14 3:04 -nodefaultlibs and gxx_personality Ivan Novick
@ 2007-05-14 18:23 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2007-05-14 18:23 UTC (permalink / raw)
To: Ivan Novick; +Cc: gcc-help
Ivan Novick <ivandn@yahoo.com> writes:
> I am trying to use -nodefaultlibs to exclude libstdc++
> but something is trying to call `__gxx_personality_v0'
> which is in libstdc++. How can one compile a simple
> C++ program without linking against libstdc++?
Link against -lsupc++. This is a smaller library which includes the
basic supporting functions required to support exception handling. It
does not include the STL.
Ian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-14 18:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-14 3:04 -nodefaultlibs and gxx_personality Ivan Novick
2007-05-14 18:23 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).