shebang launcher for D programs
Lars Ivar Igesund
larsivar at igesund.net
Wed Mar 21 13:48:30 PDT 2007
Anders F Björklund wrote:
> Lars Ivar Igesund wrote:
>
>>>I did a RPM package and manpage for it, will post them* on gdcgnu
>>>as part of the requirements for using Tango instead of Phobos...
>>
>> Well, rebuild is not a requirement anymore, at least not for Windows and
>> Linux DMD, and x86 Linux GDC as we're in the process of providing
>> prebuilt libraries. Still a very useful tool though.
>
> Actually I meant for actually *using* Tango, not just building it :-)
> My little hello/test program didn't work when I was just using dmd/gdmd,
> but does work just fine when using bud/rebuild to include dependencies:
>
> $ more hello.d
> version (Tango)
> import tango.io.Console;
> else // Phobos
> import std.stdio;
>
> void main()
> {
> version (Tango)
> Cout ("Hello, World!").newline;
> else // Phobos
> writefln("Hello, World!");
> }
>
> $ gdmd -version=Tango -version=Posix hello.d
> hello.o: In function `_Dmain':
> hello.d:(.text+0x13): undefined reference to
> `_D5tango2io7Console4CoutC5tango2io7Console7Console6Output'
> hello.d:(.text+0x2d): undefined reference to
> `_D5tango2io7Console4CoutC5tango2io7Console7Console6Output'
> hello.o:(.data+0x30): undefined reference to
> `_D5tango2io7Console12__ModuleInfoZ'
> collect2: ld returned 1 exit status
>
> $ rebuild -version=Tango -version=Posix hello.d
> WARNING: Module (null) does not have a module declaration. This can
> cause problems
> with rebuild's -oq option. If an error occurs, fix this first.
>
> $ ./hello
> Hello, World!
>
> Or are you working on that too, as I thought it was done that way on
> purpose because of limitations with including D templates in libraries
> (i.e. requiring you to include the Tango sources directly in your app)
>
> --anders
Yes, that was what I meant. We intend to provide both libphobos and libtango
(libgphobos and libgtango for GDC), since the template issues no longer
seems to be a problem. There are some interesting linker issues with DMD,
but that's more in the ld interaction area and should be easily fixable
once I post in bugzilla :)
--
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango
More information about the Digitalmars-d
mailing list