In message <[EMAIL PROTECTED]>
Jan-Jaap van der Geer <[EMAIL PROTECTED]> wrote:
> Talking about libstdc++, I assume using the standard C++ classes
> (string, iostream, stl) means the resulting executable becomes
> dependent on SharedUnixLib?
Whether that is the case is independent of whether you use these
classes. It only depends on whether you chose to build against UnixLib
(as opposed to SharedCLib).
> Looking at the info on riscos.info I could not find anything to
> suggest that this is the case.
> I did find references that it was possible to compile/link with
> -mlibscl, but apparently that did not mean that UnixLib is *not*
> used.
> In hindsight that seems reasonable, since SCL almost certainly does
> not know anything about these C++ classes
... nor do UnixLib and SharedUnixLib.
> but it surprised me initially.
I think there is a misunderstanding here. The standard C++ classes you
mentioned above are called the STL (standard template library), and
this is for a reason: They are defined as templates, not library
functions, so when you use them, the compiler instantiates them for
you and they become part of your object files. There is no need to
link with a specific library to provide the definitions as you would
have to do with ordinary library functions.
With GCC 3.4.6, you can build programs that use the STL classes and do
not use UnixLib, nor require SharedUnixLib to be loaded.
Martin
--
---------------------------------------------------------------------
Martin Wuerthner MW Software [EMAIL PROTECTED]
---------------------------------------------------------------------
_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK