native dmd and cygwin

Bruce Adams tortoise_74 at yahoo.co.uk
Mon Jul 9 15:56:12 PDT 2007


Hi,
   I've been trying to get started with D on windows. As a long time cygwin user I first tried gdc, but I've been stumped by a compiler crash
with forward declarations see:
   http://d.puremagic.com/issues/show_bug.cgi?id=1325

So I have tried using dmc/dmd instead. There seems to be some kind of environment clash. I've tried setting PATH, LIB and LINKCMD as documented on but there is clearly something I'm missing. I suspect a documentation bug (i.e. there is at least one other important var).

(note: running in DOS but with cygwin on path)
F:\projects>c:\cygwin\bin\make dtest2
dmc hello.d -o hello
c:\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

phobos.lib
 Warning 2: File Not Found phobos.lib
OPTLINK : Warning 23: No Stack
hello.obj(hello)
 Error 42: Symbol Undefined _main
hello.obj(hello)
 Error 42: Symbol Undefined __acrtused_con
OPTLINK : Warning 134: No Start Address
--- errorlevel 2
hello.d:
--- errorlevel 2
make: *** [dtest2] Error 2

If instead of using my normal cygwin friendly DOS prompt I use a plain one I can get the samples to compile using shell all.sh as documented
on http://www.digitalmars.com/d/dcompiler.html. I've played with bud/build with similar results. Anyone know what the critical setting(s) I'm missing is? 

Regards,

Bruce.




More information about the Digitalmars-d mailing list