help-gplusplus
[Top][All Lists]
Advanced

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

Re: No standard library compilation


From: Philippe Amarenco
Subject: Re: No standard library compilation
Date: Sat, 03 Jun 2006 17:01:06 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

"ernesto" <ebasconp@gmail.com> writes:

> Hi everybody:
>
> I want to develop a C++ application (or shared library) [using objects,
> inheritance, polymorphism, RTTI, templates, exception handling, etc.]
> but I do not want to use the libstdc++ library.
>
> I know that I can avoid linking with the default libraries telling
> "-nodefaultlibs" to the compiler, but then a lot of errors are raised.
>
> So, what basic methods should I implement in order to have full C++
> features on my application without using the libstdc++?
>
> Maybe I need to implement a minimalistic "standard library"-like
> library?
>
> Is there some documentation about it somewhere?
>

If you drop RTTI and exception handling, you won't need any runtime
support for C++.

I have been told (but don't know for sure) gcc conforms to this:

        http://www.codesourcery.com/cxx-abi/abi-eh.html

after reading this, I realised how practical was the -fno-exceptions
and -fno-rtti compile options... :)

the only problem with disabling exceptions is that you cannot do dynamic
allocation within a constructor [unless you can garantee it will
succeed]. if I'm guessing right, you're developping on a small
embedded system so it shouldn't matter much. 

-- 
Philippe Amarenco, aka Phix
epita 2007 - GISTR - LSE - EpX


reply via email to

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