WeakRef updated to better support Tango -- and a question

Lars Ivar Igesund larsivar at igesund.net
Mon Mar 24 08:27:12 PDT 2008


e-t172 wrote:

> Jason House a écrit :
>> I'm still confused. I did not need to link to Phobos for a Tango project
>> before. Why now? How do I generalize for both dmd and gdc?
> 
> When you install Tango, libphobos.a is actually replaced with the core
> Tango library. This is because it is not yet possible to link to a
> different standard library than libgphobos, so Tango replaces libgphobos
> with his own library. (Note: Tango also replaces libgphobos with GDC,
> even though GDC permits the use of a different standard library through
> the -nophoboslib switch and manual linking)
> 
> Normally, libphobos is automatically linked in by dmd/gdc. If you have
> to add -lphobos (or -lgphobos) to your command line, this is not normal.

Actually, some inaccuracy here:

Since 0.99.2 or 0.99.3, Tango has installed libtango-base-dmd.a for DMD,
used via the -defaultlib switch. For GDC we indeed install libgphobos,
since there is no equivalent switch for GDC that also can be put in a .conf
file like with dmd.conf.

In both cases, you should not notice the use of that library, as it
happens "behind the scenes". So in the case of libgphobos - if the wrong
one is installed, Tango's runtime features will not work.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list