shebang launcher for D programs

Anders F Björklund afb at algonet.se
Wed Mar 21 13:12:22 PDT 2007


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



More information about the Digitalmars-d mailing list