Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Undefined symbols on OS X

Moderators: kris

Posted: 06/18/07 21:56:39 Modified: 06/18/07 21:58:08

I managed to compile and install Tango 0.98 (release) successfully.

I am trying to compile the first program given on : http://dsource.org/projects/tango/wiki/TopicFirstTangoProgram

But I always get linker errors.

$ gdc -fversion=Posix -lgphobos -o test test.d
/usr/bin/ld: Undefined symbols:
__D5tango2io7Console12__ModuleInfoZ
__D5tango2io7Console4CoutC5tango2io7Console7Console6Output
collect2: ld returned 1 exit status

$ nm /usr/lib/libgphobos.a | grep tango | wc -l
     362
$ nm /usr/lib/libgphobos.a | grep __D5tango2io7Console12__ModuleInfoZ
$ nm /usr/lib/libgphobos.a | grep __D5tango2io7Console4CoutC5tango2io7Console7Console6Output

Do you know what I am doing wrong?

Thanks.

Author Message

Posted: 06/18/07 22:19:06

libgphobos only provides the runtime part of Tango, the user API's are either available from libgtango built with lib/build-tango.sh , or by using a dependency tracking tool like rebuild.