Thread overview
Minor portability problem with dmd
Nov 04, 2003
Lars Ivar Igesund
Nov 04, 2003
Walter
Nov 05, 2003
Lars Ivar Igesund
Nov 07, 2003
Walter
November 04, 2003
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


November 04, 2003
"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?


November 05, 2003
"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


November 07, 2003
"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.