Bug 19821 – Cannot pass linker argument with spaces
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2019-04-24T18:37:41Z
Last change time
2019-10-18T06:13:10Z
Assigned to
No Owner
Creator
Jacob Carlborg
Comments
Comment #0 by doob — 2019-04-24T18:37:41Z
With an empty D file, running the following command:
dmd main.d -L/LIBPATH:"C:\Program Files" -v -m64
Will output, among other things:
/LIBPATH:C:\Program Files
And fail with:
LINK : fatal error LNK1181: cannot open input file 'Files.obj'
The problem is that the path should be quoted because it contains spaces.
Comment #1 by doob — 2019-04-25T09:26:36Z
*** This issue has been marked as a duplicate of issue 16677 ***
Comment #2 by dlang-bot — 2019-10-18T06:13:10Z
dlang/dmd pull request #10459 "[stable] Fix linker flags with blanks on Windows" was merged into stable:
- ec6de46e76efd34d3f8a5d97f89cd1f42beb1cdd by Martin Kinkelin:
Fix linker flags with spaces on Windows
Fixes issue 19821 and 16677 for MS link.exe only (I haven't checked
Optlink).
https://github.com/dlang/dmd/pull/10459