[Issue 16677] -L flag ignores quotes in the arguments passed to the linker

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 7 20:16:42 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=16677

kinke <kinke at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kinke at gmx.net

--- Comment #6 from kinke <kinke at gmx.net> ---
This seems to be a DMD bug when building the linker cmdline on Windows, at
least for link.exe - it simply doesn't do any quoting and writes the linker
flag directly into the cmdline string. On POSIX, an arguments array is used.

POSIX:

$ dmd '-Labc def' foo.d
/usr/bin/ld: error: cannot open abc def: No such file or directory

Windows:

dmd "-Labc def" -m64 foo.d
LINK : fatal error LNK1181: cannot open input file 'abc.obj'

[The current way to make it work is an extremely ugly `dmd "-L\"abc def\"" -m64
foo.d`.]

--


More information about the Digitalmars-d-bugs mailing list