tango and gdc
Carlos Santander
csantander619 at gmail.com
Fri Aug 17 10:48:01 PDT 2007
Lars Noschinski escribió:
> * Carlos Santander <csantander619 at gmail.com> [07-08-16 07:00]:
>>
>> I've had more luck getting Tango programs to compile with either Bud
>> (as in the examples) or Rebuild.
>
> Bud does not build with Tango, so I tried rebuild. It works, but builds
> a lot of object files, probably one for each Tango class used. This is
> somehow annoying and I wonder, if there should not a precompiled binary?
>
> I installed Tango/GDC via the tango+gdc installer from the tango
> website in /usr/local.
Regarding Bud, first you would have to build it using GPhobos, and then switch
to Tango.
Both Bud and Rebuild will create all those object files; that's how they work.
You could put the files in a global directory and use that directory as your
library. Something like, /home/lars/tango/obj, and configure all your projects
to use that path as obj output. I'm not doing that because I just thought of
that idea, but I think it could work.
Someone once gave me this sh script to build a Tango library. I don't use it,
but you could find it useful.
#!/bin/sh
rm obj/*.o libltango.a -v
export count=0; find tango -name "*.d" |while read a; do count=`expr $count +
1`; gdc -ltango -c -o obj/$count.o -O2 -finline-functions -frelease
-fversion=Posix $a 2>/dev/null && echo -n "$count-$a ° "; done
ar q libltango.a obj/*.o
I guess you wouldn't need Bud or Rebuild if you use the resulting library.
--
Carlos Santander Bernal
More information about the Digitalmars-d-learn
mailing list