DMD -L Flag, maybe a bug?

Bubbasaur via Digitalmars-d-learn digitalmars-d-learn at
Sat Dec 26 05:24:33 PST 2015

On Saturday, 26 December 2015 at 11:19:27 UTC, anonymous wrote:
> ...
> Note that in the docs I linked it's `dmd hello.d -L+gtkd.lib` 
> with a plus sign. I'm not sure if it's significant, but it's a 
> difference.

There are two ways in the doc you linked:

dmd hello.d -L+gtkd.lib
dmd hello.d -Lgtkd.lib -m64

The second doesn't uses "+" but it has "-m64". Anyway even the 
example with "+" it doesn't working here either.

> Also, and this may be it, the link.exe that's distributed with 
> dmd doesn't like forward slashes as path separators. You can 
> try it with backslashes instead:
> dmd test.d -LC:\gtkd\src\build\GtkD.lib

I had tried that before, without any success.

> -L doesn't take a space, either. Putting a space there isn't 
> even optional, it's wrong. The stuff after the space is not 
> passed to the linker, it's interpreted by dmd.

In fact I already had understood what happened after your first 
answer, which "-L" with space wasn't been "evaluated" because DMD 
was reading a flag without arguments. So I could omit it there, 
but like I said, many examples out there uses:
"-Lpath/to/whatever", and then you see many topics about people 
complaining about this.


More information about the Digitalmars-d-learn mailing list