On Monday, 21 March 2016 at 10:46:27 UTC, ag0aep6g wrote:
On 21.03.2016 11:19, ZombineDev wrote:
DFLAGS=-I~/dev/repos/dlang/druntime/import
-I~/dev/repos/dlang/phobos
-L-L/home/zombinedev/dev/repos/dlang/phobos/generated/*/release/64
[...]
Linking...
...
/usr/bin/ld {other stuff...}
-L/home/zombinedev/dev/repos/dlang/phobos/generated/*/release/64 -lphobos2
/usr/bin/ld: cannot find -lphobos2
However
$ ls
/home/zombinedev/dev/repos/dlang/phobos/generated/*/release/64
etc libphobos2.a libphobos2.so libphobos2.so.0.70
libphobos2.so.0.70.0 libphobos2.so.0.70.o
Any idea what I'm doing wrong?
Asterisk expansion is a shell feature. dmd probably doesn't go
through a shell when running ld.
Even if it did, no expansion would be done there, because the
word is looked at as a whole. With the leading "-L", the
pattern doesn't match an actual path. For example, compare
`echo /*` with `echo -L/*`.
You have to spell the different paths out.
Thanks a lot! I replaced "*" with the name of my OS and it all
works!
I thought that if it could replace $HOME, it ought to replace the
asterisk.
Probably I should add this caveat to
http://wiki.dlang.org/Starting_as_a_Contributor#Running_Independent_Programs for future reference.