WeakRef updated to better support Tango -- and a question
Jason House
jason.james.house at gmail.com
Mon Mar 24 19:02:34 PDT 2008
Lars Ivar Igesund wrote:
> 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.
>
Regardless, adding -lgtango and -lgphobos doesn't solve my linking issues.
Below is a copy and paste of the complete output. I also attached my TT
code that's causing my problem.
gdc -funittest -w -g -fversion=Posix hb_version.d gogui.d gtp.d housebot.d
ipc.d log.d random.d sgf.d sleep.d tangoBind.d timecontrol.d
game/definition.d game/definitions.d game/go.d search/alphabeta.d
search/amaf.d search/control.d search/controllers.d search/ihr.d
search/montecarlo.d search/transposition.d
search/uct.d -Wl,-lgtango,-lgphobos -o housebot-0.7
/tmp/cchUQ681.o: In function
`_D6search13transposition64__T18transpositionTableTC6search9alphabeta19alphaBetaSearchNodeZ18transpositionTable13opIndexAssignMFC6search9alphabeta19alphaBetaSearchNodemZv':
/home/jhouse/housebot/0.7/search/transposition.d:62: undefined reference to
`rt_attachDisposeEvent'
/tmp/cchUQ681.o: In function
`_D6search13transposition64__T18transpositionTableTC6search9alphabeta19alphaBetaSearchNodeZ18transpositionTable6removeMFmZv':
/home/jhouse/housebot/0.7/search/transposition.d:65: undefined reference to
`rt_detachDisposeEvent'
/tmp/ccC0WgII.o: In function
`_D6search13transposition52__T18transpositionTableTC6search3uct13uctSearchNodeZ18transpositionTable13opIndexAssignMFC6search3uct13uctSearchNodemZv':
/home/jhouse/housebot/0.7/search/transposition.d:62: undefined reference to
`rt_attachDisposeEvent'
/tmp/ccC0WgII.o: In function
`_D6search13transposition52__T18transpositionTableTC6search3uct13uctSearchNodeZ18transpositionTable6removeMFmZv':
/home/jhouse/housebot/0.7/search/transposition.d:65: undefined reference to
`rt_detachDisposeEvent'
collect2: ld returned 1 exit status
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: transposition.d
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080324/a9029bb1/attachment.ksh>
More information about the Digitalmars-d
mailing list