Cannot find libphobos2.a ?
Lars T. Kyllingstad
public at kyllingen.NOSPAMnet
Tue Dec 27 07:08:01 PST 2011
On Tue, 27 Dec 2011 21:29:26 +0700, Andre Tampubolon wrote:
> I just successfully built dmd, druntime, and phobos from the git tree.
>
> Later I tried using this command to build a simple D program, and
> failed: ~/Digital-Mars/dmd/src/dmd -I~/Digital-Mars/druntime/import
> -I~/DigitalMars/phobos
> -L-L~/Digital-Mars/phobos/generated/linux/release/32/lib/libphobos2.a
> test.d
>
> The error is:
> collect2: ld returned 1 exit status
> --- errorlevel 1
>
> Yet it's obvious that libphobos2.a is in
> ~/Digital-Mars/phobos/generated/linux/release/32. But if I didn't use
> the linker flag, and instead put libphobos2.a in /usr/lib, that command
> would work.
>
> So how to use specify the linker flag correctly?
I think the -L option should only be used to specify a directory in which
to search for libraries, while you put the full path to the library
there. DMD already knows it should look for a file named libphobos2.a,
so try
-L-L~/Digital-Mars/phobos/generated/linux/release/32/lib
Lars
More information about the Digitalmars-d
mailing list