digitalmars.D - tango module object cannot read file object.d
- Martin d Anjou (8/8) Feb 04 2007 $ /tools/bin/dmd -L-L/tools/lib/libphobos.a -I/tools/SRC/tango/tango t...
- kris (5/19) Feb 04 2007 It may be that your -I is one level too deep? Looks like it ^^. In
- Martin d Anjou (11/12) Feb 04 2007 Yes, that was it.
- Frits van Bommel (4/18) Feb 04 2007 Because it can't find the library specified by -lphobos. just like it sa...
$ /tools/bin/dmd -L-L/tools/lib/libphobos.a -I/tools/SRC/tango/tango ttango.d object.d: module object cannot read file 'object.d' $ cat /tools/bin/dmd.conf [Environment] ; DFLAGS=-I/tools/SRC/dmd/dmd/src/phobos DFLAGS="-I/tools/SRC/tango/tango" -version=Tango -version=Posix Can someone help me with what's wrong here? Thanks. Martin
Feb 04 2007
Martin d Anjou wrote:$ /tools/bin/dmd -L-L/tools/lib/libphobos.a -I/tools/SRC/tango/tango ttango.d object.d: module object cannot read file 'object.d' $ cat /tools/bin/dmd.conf [Environment] ; DFLAGS=-I/tools/SRC/dmd/dmd/src/phobos DFLAGS="-I/tools/SRC/tango/tango" -version=Tango -version=Posix Can someone help me with what's wrong here? Thanks. MartinIt may be that your -I is one level too deep? Looks like it ^^. In general you're likely to get a faster response over at the Tango forums, or the IRC channel, since that's where we spend most of our time :) http://www.dsource.org/projects/tango/wiki/Contact
Feb 04 2007
It may be that your -I is one level too deep? Looks like it ^^. In generalYes, that was it. 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? Martin
Feb 04 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.
Feb 04 2007