Relative lflag paths in dub on Windows

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 27 17:16:23 PDT 2017


On Tuesday, 27 June 2017 at 19:07:49 UTC, jmh530 wrote:
> Is it possible to set relative -L paths on dub for Windows? 
> Absolute paths work fine, just can't get relative paths working.
>
> I was looking at the thread here
> https://forum.dlang.org/post/dkwqrwzwqbrnaamlvtld@forum.dlang.org
> and came up with something like
> {
>     ...
>     "lflags": ["-L-L..\\libs\\"],
> }
>
> where the file structure contains folders dubproject\libs and 
> dubproject\source.
>
> It didn't work though.

You have to specify the appropriate linker option, e.g. 
-L-option. For gcc, that happens to -L, so you get -L-L. For 
optlink it's +something and for the MS linker it's /something. 
I'm on my phone else I'd look it up.


More information about the Digitalmars-d-learn mailing list