digitalmars.D.learn - Relative lflag paths in dub on Windows
- jmh530 (12/12) Jun 27 2017 Is it possible to set relative -L paths on dub for Windows?
- Mike Parker (5/17) Jun 27 2017 You have to specify the appropriate linker option, e.g.
- Mike Parker (7/12) Jun 27 2017 Optlink instructions at [1]: -L+path\
- jmh530 (4/17) Jun 28 2017 I appreciate you posting this. I had found the /LIBPATH, but dub
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.
Jun 27 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.
Jun 27 2017
On Wednesday, 28 June 2017 at 00:16:23 UTC, Mike Parker wrote:On Tuesday, 27 June 2017 at 19:07:49 UTC, 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.Optlink instructions at [1]: -L+path\ MS linker [2]: -L/LIBPATH:path [1] https://wiki.dlang.org/Compiling_and_linking_with_DMD_on_Windows [2] https://docs.microsoft.com/en-us/cpp/build/reference/libpath-additional-libpath
Jun 27 2017
On Wednesday, 28 June 2017 at 00:22:56 UTC, Mike Parker wrote:On Wednesday, 28 June 2017 at 00:16:23 UTC, Mike Parker wrote:I appreciate you posting this. I had found the /LIBPATH, but dub randomly crapped out on me before I was about to test it, so I'm going to start another thread just on that...On Tuesday, 27 June 2017 at 19:07:49 UTC, 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.Optlink instructions at [1]: -L+path\ MS linker [2]: -L/LIBPATH:path [1] https://wiki.dlang.org/Compiling_and_linking_with_DMD_on_Windows [2] https://docs.microsoft.com/en-us/cpp/build/reference/libpath-additional-libpath
Jun 28 2017