www.digitalmars.com         C & C++   DMDScript  

D - Minor portability problem with dmd

reply "Lars Ivar Igesund" <larsivi stud.ntnu.no> writes:
dmd accepts switches in the /switch format. This turns out
to be a problem when / is used as a path separator instead
of \. Suddenly dmd (or is it the linker?) thinks the file after
the / is a switch and fails. And doing "foo/src.d" don't help.

Lars Ivar Igesund
Nov 04 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Lars Ivar Igesund" <larsivi stud.ntnu.no> wrote in message
news:bo7ssu$15r3$1 digitaldaemon.com...
 dmd accepts switches in the /switch format.
It shouldn't, and checking the code (mars.c) it doesn't.
 This turns out
 to be a problem when / is used as a path separator instead
 of \. Suddenly dmd (or is it the linker?) thinks the file after
 the / is a switch and fails. And doing "foo/src.d" don't help.
What is the command line you're using?
Nov 04 2003
parent reply "Lars Ivar Igesund" <larsivi stud.ntnu.no> writes:
"Walter" <walter digitalmars.com> wrote in message
news:bo8us9$2mpj$1 digitaldaemon.com...
 "Lars Ivar Igesund" <larsivi stud.ntnu.no> wrote in message
 news:bo7ssu$15r3$1 digitaldaemon.com...
 dmd accepts switches in the /switch format.
It shouldn't, and checking the code (mars.c) it doesn't.
 This turns out
 to be a problem when / is used as a path separator instead
 of \. Suddenly dmd (or is it the linker?) thinks the file after
 the / is a switch and fails. And doing "foo/src.d" don't help.
What is the command line you're using?
The setting is a subdirectory foo with a source file ddepcheck.d Using
 dmd foo/ddepcheck.d
results in this: C:\projects\code>dmd foo/ddepcheck.d C:\dmd\bin\..\..\dm\bin\link.exe foo/ddepcheck,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved OPTLINK : Warning 9: Unknown Option : DDEPCHECK foo.obj Error 2: File Not Found foo.obj --- errorlevel 1 Lars Ivar Igesund
Nov 05 2003
parent "Walter" <walter digitalmars.com> writes:
"Lars Ivar Igesund" <larsivi stud.ntnu.no> wrote in message
news:boab4o$1k4o$1 digitaldaemon.com...
 "Walter" <walter digitalmars.com> wrote in message
 news:bo8us9$2mpj$1 digitaldaemon.com...
 "Lars Ivar Igesund" <larsivi stud.ntnu.no> wrote in message
 news:bo7ssu$15r3$1 digitaldaemon.com...
 dmd accepts switches in the /switch format.
It shouldn't, and checking the code (mars.c) it doesn't.
 This turns out
 to be a problem when / is used as a path separator instead
 of \. Suddenly dmd (or is it the linker?) thinks the file after
 the / is a switch and fails. And doing "foo/src.d" don't help.
What is the command line you're using?
The setting is a subdirectory foo with a source file ddepcheck.d Using
 dmd foo/ddepcheck.d
results in this: C:\projects\code>dmd foo/ddepcheck.d C:\dmd\bin\..\..\dm\bin\link.exe foo/ddepcheck,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved OPTLINK : Warning 9: Unknown Option : DDEPCHECK foo.obj Error 2: File Not Found foo.obj --- errorlevel 1
I see now. Use \ for path separators under Windows, and it should be fine.
Nov 06 2003