www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dmd: how to pass several linker options with just one -L? (or feature

is there a way to achieve this:
dmd -L-lfoo -L-lbar main.d
with a single call to -L to pass several linker options; something like:
dmd -L'-lfoo -lbar' main.d
except that won't work due to '' being treated as one argument.
Maybe something like:
dmd --L=' flag1 flag2' main.d
which would treat the argument to --L= as string[] instead of string
(alternative name: linkopts=)

This example is simple on purpose, but in more complex case all I can do is
write a script to avoid that; and it makes it simpler to interface with C
based applications.
Sep 06 2013