www.digitalmars.com         C & C++   DMDScript  

D - Can't compile HTML

The samples/d/hello.d compiles ok, but html/d/html.html
gives the followin error:

/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libphobos.a(dmain2.o): In
function `main':
dmain2.o(.gnu.linkonce.tmain+0x6e): undefined reference to `_Dmain'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libphobos.a(deh2.o): In function
undefined reference to `_deh_beg'
undefined reference to `_deh_beg'
undefined reference to `_deh_end'
undefined reference to `_deh_end'
collect2: ld returned 1 exit status
--- errorlevel 256

I get exactly the same error message if I rename 
hello.d to hello.html and add the obligatory tags:


int main(char[][] args)
printf("hello world\n");
printf("args.length = %d\n", args.length);
for (int i = 0; i < args.length; i++)
printf("args[%d] = '%s'\n", i, (char *)args[i]);
return 0;


Have I missed something in the documentation?
Jun 06 2003