help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c++ without libstdc++


From: John Wilson
Subject: Re: c++ without libstdc++
Date: Sat, 28 May 2005 13:45:17 +0100

"Maurice" <mauricex@gmx.net> wrote in message 
news:d72sg6$i9s$03$1@news.t-online.com...
> Hello,
>
> for an embedded system I would like to write in C++ using
> gcc 2.95 but without linking to libstdc++ (its too big).
> I wonder how far this is possible:
>
>  struct Foo {
>      Foo(){}
>      ~Foo(){}
>  };
>  int main() { Foo a; }
>
>  $ g++ -nodefaultlibs -fno-exceptions -lc a.cc
>
>  In function `Foo::~Foo(void)':
>  ... undefined reference to `__builtin_delete'
>
> Without this destructor there is no problem. But C++ without
> using destructors... thats not funny either.
>
> Is there anything I can do?

I'm not sure 2.95 supports this, but you could try linking against libsupc++ 
which just contains the C++ language support functions - it is by no means 
tiny, but it's OK for a fairly modest embedded platform.

John.

> Thank you. 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]