tango module object cannot read file object.d

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sun Feb 4 23:48:43 PST 2007


Martin d Anjou wrote:
> Now the linker can't find phobos:
> 
> $ /tools/bin/dmd -L-L/tools/SRC/tango/lib/libphobos.a -I/tools/SRC/tango 
> ttango.d
> gcc ttango.o -o ttango -m32 -lphobos -lpthread -lm -Xlinker 
> -L/tools/SRC/tango/lib/libphobos.a
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: 
> cannot find -lphobos
> collect2: ld returned 1 exit status
> --- errorlevel 1
> $ file /tools/SRC/tango/lib/libphobos.a
> /tools/SRC/tango/lib/libphobos.a: current ar archive
> 
> So phobos is there... but why the error?

Because it can't find the library specified by -lphobos. just like it says?
Try dropping the '/libphobos.a' from the -L. -L is for specifying the 
*directory* to look for libraries, not the library itself.



More information about the Digitalmars-d mailing list