incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Bauer <Mathias_Ba...@gmx.net>
Subject Re: build svtools with debug
Date Thu, 27 Sep 2012 19:00:08 GMT
Am 26.09.2012 18:19, schrieb Armin Le Grand:>
> Index: Library_hatchwindowfactory.mk
> ===================================================================
> --- Library_hatchwindowfactory.mk       (revision 1389804)
> +++ Library_hatchwindowfactory.mk       (working copy)
> @@ -43,6 +43,7 @@
>          tk \
>          tl \
>          vcl \
> +       stl \
>          $(gb_STDLIBS) \
>   ))
> 
> @Pedro: Is this a solution? Maybe when using debug, extra stuff using 
> stl to verify things (remember data in a vector?) gets compiled. I do 
> not know how bad it is to always link against stl for 
> hatchwindowfactory, even without debug build. What do You think?

Your assumption is a good one, I remember seeing this in other cases in
the past.

But there are other possible reasons. Using a template library might be
fine without linking against its binary part, if the compiler decides to
instantiate the templates in the library using the template. But
sometimes the compiler decides not to do that and requires external
linkage, so you have to link against the library. This may depend on
compiler settings in a very subtle way, so using DEBUG might be able to
trigger such a difference.

That's the "beauty" of templates. :-)

Especially with a compiler like the MSVC compiler that has some serious
defects in this regard (I once wrote a blog about the joy of linking
against symbols that contain templates on GulFOSS. Those where the days...).

Regards,
Mathias

(who currently works with Objective-C and would love to have problems
like this instead of using a programming language that neither has
templates nor namespaces. But hey, at least it has closures. :-))

Mime
View raw message