GDC and Tango problem

grauzone none at example.net
Tue Dec 29 13:34:20 PST 2009


revcompgeek wrote:
> 
> So I tried building Tango trunk a while ago, and it actually built
> surprisingly well, with only one small error I was able to fix. So I
> installed the tango library and proceeded to test if tango was really
> working. So in hello.d:
> 
> import tango.io.Stdout;
> void main(){ Stdout("Hello {}!","World").newline; }
> 
> I don't know why, but I had to manually add object.d to the command
> line. To simplify, I put an object file of object.d into the current
> directory.
> 
> tests% gdc -o hello hello.d object.o -lgtango -lgphobos
> ld: duplicate symbol __D6object9Interface6__initZ in
> /usr/local/lib/libgphobos.a(object.o) and object.o
> collect2: ld returned 1 exit status
> 
> I'm not sure if this problem is an issue with gdc or a problem with
> Tango. Any ideas on how to fix this?

You're linking with both Phobos and Tango. You can't do that, because 
both come with their own (incompatible) runtime. Removing the 
"-lgphobos" should work.



More information about the Digitalmars-d mailing list