/usr/bin/ld: cannot find -lphobos2

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 21 03:46:27 PDT 2016


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.


More information about the Digitalmars-d-learn mailing list