Bug 2249 – DMD can't handle include paths with spaces in them
Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-07-26T20:09:40Z
Last change time
2017-10-25T02:54:07Z
Keywords
bootcamp
Assigned to
No Owner
Creator
Paul Dufresne
Comments
Comment #0 by dufresnep — 2008-07-26T20:09:40Z
Symptom: When 'dmd somefile.d' get:
object.d: module object cannot read file 'object.d'
Probable reason: probably does not handle spaces in path in -I for DFLAGS in sc.ini coming from %@P% which I believe to be the path of DMD.
I tried to write full path to -IC:\... in sc.ini, but that did not helped.
I use an openshell.bat file:
==========
@echo off
PATH=%CD%\bin;%PATH%
PROMPT=%USERNAME%@%COMPUTERNAME%:$P$G$S
COLOR 0F
ECHO Shell setup for Digital Mars D Compiling and Debugging
ECHO change which drive you're on: [Drive Letter]:\
ECHO eg. C:\ to change to C drive
%HOMEDRIVE%
CD %HOMEPATH%
CMD
============
Does not work on my Desktop (probably because of "Documents and Settings").
So I tried do decompress to "C:\OKTANGO" the whole thing. Was working fine there.
Then renamed to "C:\BAD TANGO" and rerun openshell.bat and recompile hello.d, with the "object.d: module object cannot read file 'object.d'" message.
I am using tangobos-0.99.7-bin-win32-dmd.1.033.
Comment #1 by torhu — 2008-08-06T16:55:42Z
Yup, dmd can't handle include paths with spaces in them, at least not when settings them in sc.ini. It's annoying, but more or less documented here:
http://www.digitalmars.com/d/1.0/dmd-windows.html#problems
It's likely that the linker (optlink) can't handle paths with spaces either, and that's not likely to be fixed anytime soon. So avoiding spaces is the way to go.
Comment #2 by free_on — 2009-04-23T09:39:36Z
This problem will be fixed in future releases?
Comment #3 by clugdbug — 2009-04-23T10:17:59Z
(In reply to comment #2)
> This problem will be fixed in future releases?
No. Optlink hasn't been changed in a decade, AFAIK; its bugs will probably never get fixed.
Comment #4 by cristian — 2009-05-08T00:52:05Z
I think that the linker is a separate issue -- importing modules is strictly a front-end issue, and an annoying one, if one is foolish enough to install D in, say, c:\Program Files\Digital Mars\
Comment #5 by free_on — 2009-08-20T04:03:24Z
Is this problem will be forever? This will impose restrictions on the IDE for D and installers. If the linker can be used other (not Optlink) that the compiler - no. Walter, please, fix it.