Thread overview
Cant get hello.d to build:
Mar 03, 2007
Andy Little
Mar 03, 2007
Tiberiu Gal
Mar 03, 2007
Frits van Bommel
Mar 03, 2007
Andy Little
Mar 04, 2007
Bradley Smith
Mar 05, 2007
Andy Little
March 03, 2007
Cant get hello.d to build:

Directory setup

dmd.zip --> C:/digital_mars/dmd

e.g dmd/dmd/bin --> C:/digital_mars/dmd/dmd/bin

dmc.zip --> C:/digital_mars/dmc

e.g dmc/dmc/bin --> C:/digital_mars/dmc/dm.bin


Put hello.d in

D:/projects/dmd/hello.d

from D:/projects/dmd

create batch file setting up PatH:

"
set PATH=C:/digital_mars/dmd/dmd/bin;c:/digital_mars/dmd/dm/bin;c:/digital_mars/dmc/dm/bin
"

from D:/projects/dmd, (After running path setup batch file) On running command

D:\Projects\dmd>dmd hello.d
C:\digital_mars\dmd\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi;
Can't run 'C:\digital_mars\dmd\dmd\bin\..\..\dm\bin\link.exe', check PATH

D:\Projects\dmd>

 (Object file hello.obj Is created ) in D:/projects/dmd/

linker is found :

D:\Projects\dmd>link
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

OPTLINK : Warning 23: No Stack
OPTLINK : Warning 134: No Start Address

What's the problem?
regards
Andy Little
March 03, 2007
do you have a main function in your hello.d ?

void main()
{
	printf("hello world");
}

... because you need one :)

On Sat, 03 Mar 2007 14:42:49 +0200, Andy Little <andy@servocomm.freeserve.co.uk> wrote:

>
> Cant get hello.d to build:
>
> Directory setup
>
> dmd.zip --> C:/digital_mars/dmd
>
> e.g dmd/dmd/bin --> C:/digital_mars/dmd/dmd/bin
>
> dmc.zip --> C:/digital_mars/dmc
>
> e.g dmc/dmc/bin --> C:/digital_mars/dmc/dm.bin
>
>
> Put hello.d in
>
> D:/projects/dmd/hello.d
>
> from D:/projects/dmd
>
> create batch file setting up PatH:
>
> "
> set PATH=C:/digital_mars/dmd/dmd/bin;c:/digital_mars/dmd/dm/bin;c:/digital_mars/dmc/dm/bin
> "
>
> from D:/projects/dmd, (After running path setup batch file) On running command
>
> D:\Projects\dmd>dmd hello.d
> C:\digital_mars\dmd\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi;
> Can't run 'C:\digital_mars\dmd\dmd\bin\..\..\dm\bin\link.exe', check PATH
>
> D:\Projects\dmd>
>
>  (Object file hello.obj Is created ) in D:/projects/dmd/
>
> linker is found :
>
> D:\Projects\dmd>link
> OPTLINK (R) for Win32  Release 7.50B1
> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
>
> OPTLINK : Warning 23: No Stack
> OPTLINK : Warning 134: No Start Address
>
> What's the problem?
> regards
> Andy Little



-- 
Tiberiu Gal
March 03, 2007
Andy Little wrote:
> Cant get hello.d to build:
> 
> Directory setup
> 
> dmd.zip --> C:/digital_mars/dmd
> 
> e.g dmd/dmd/bin --> C:/digital_mars/dmd/dmd/bin
> 
> dmc.zip --> C:/digital_mars/dmc
> 
> e.g dmc/dmc/bin --> C:/digital_mars/dmc/dm.bin
[snip]
> D:\Projects\dmd>dmd hello.d
> C:\digital_mars\dmd\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi;
> Can't run 'C:\digital_mars\dmd\dmd\bin\..\..\dm\bin\link.exe', check PATH

Try unzipping both zip files directly to c:/digital_mars. IIRC both have a directory 'dm', but don't contain any conflicting files.

Alternatively, edit your PATH environment variable to contain "c:\digital_mars\dmc\dmd\bin", or edit your sc.ini file to contain the lines:
---
[Environment]
LINKCMD="c:\digital_mars\dmc\dm\bin\link"
---

(dmd looks for sc.ini in the current working directory, the directory specified by the HOME environment variable, and the directory dmd.exe is in -- in that order)
March 03, 2007
Frits van Bommel Wrote:

> Andy Little wrote:
> > Cant get hello.d to build:
<...>

> Try unzipping both zip files directly to c:/digital_mars. IIRC both have a directory 'dm', but don't contain any conflicting files.

Well. I've got a

C:/digital_mars/dmc/dm/bin/( make.exe | lib.exe)

and a

C:/digital_mars/dmd/dm/bin(make.exe | lib.exe)

FWIW I also have a

C:/digital_mars/dmd/dmd/bin/make.exe.

And the c and d ones seem to be different.

> Alternatively, edit your PATH environment variable to contain "c:\digital_mars\dmc\dmd\bin",

Well, I have put that in the PATH in the batch file  --> at the end.

> or edit your sc.ini file to contain the lines:
> ---
> [Environment]
> LINKCMD="c:\digital_mars\dmc\dm\bin\link"

Tried this but no change in the error message...

I have however found that if I execute link separately it builds OK.
e.g ( batch file)
"
set PATH=C:/digital_mars/dmd/dmd/bin;c:/digital_mars/dmd/dm/bin;c:/digital_mars/dmc/dm/bin
set LIB=C:/digital_mars/dmd/dmd/lib;c:/digital_mars/dmd/dm/lib;c:/digital_mars/dmc/dm/lib
dmd -c hello.d
link hello

"
I guess I'll have to live with that for the moment.

Thanks for the replies.

Regards
Andy Little




March 04, 2007
Andy Little wrote:
> Frits van Bommel Wrote:
> 
>> Andy Little wrote:
>>> Cant get hello.d to build:
> <...>
> 
>> Try unzipping both zip files directly to c:/digital_mars. IIRC both have a directory 'dm', but don't contain any conflicting files.
> 
> Well. I've got a
> 
> C:/digital_mars/dmc/dm/bin/( make.exe | lib.exe)
> 
> and a
> 
> C:/digital_mars/dmd/dm/bin(make.exe | lib.exe)
> 
> FWIW I also have a 
> 
> C:/digital_mars/dmd/dmd/bin/make.exe.
> 
> And the c and d ones seem to be different.
> 
>> Alternatively, edit your PATH environment variable to contain "c:\digital_mars\dmc\dmd\bin",
> 
> Well, I have put that in the PATH in the batch file  --> at the end. 
> 
>> or edit your sc.ini file to contain the lines:
>> ---
>> [Environment]
>> LINKCMD="c:\digital_mars\dmc\dm\bin\link"
> 
> Tried this but no change in the error message...
> 
> I have however found that if I execute link separately it builds OK.
> e.g ( batch file)
> "
> set PATH=C:/digital_mars/dmd/dmd/bin;c:/digital_mars/dmd/dm/bin;c:/digital_mars/dmc/dm/bin
> set LIB=C:/digital_mars/dmd/dmd/lib;c:/digital_mars/dmd/dm/lib;c:/digital_mars/dmc/dm/lib
> dmd -c hello.d
> link hello
> 
> "
> I guess I'll have to live with that for the moment.
> 
> Thanks for the replies.
> 
> Regards
> Andy Little
> 
> 
> 
> 
Try

LINKCMD=c:\digital_mars\dmc\dm\bin\link.exe

No quotes.
March 05, 2007
Bradley Smith Wrote:

<...>

> Try
> 
> LINKCMD=c:\digital_mars\dmc\dm\bin\link.exe
> 
> No quotes.

That worked... Thanks !

regards
Andy Little