On Mon, Dec 17, 2012 at 11:08:00AM -0800, H. S. Teoh wrote: [...] > Anyway. The command is missing a "-L-L." option. It should read: > > /usr/src/d/dmd/src/dmd -ofprog prog.o -L-L. -L-lmylib > > which passes a "-L." option to the linker to make it search the current > directory for the library. [...]
Clarification: I guess what I meant was that for each $path in LIBPATH, there should be a corresponding option "-L-L$path" in the linker command. It just happened to be "." for my project. But in general, one would need to generate a -L-L option for each path in LIBPATH so that the linker knows where to look for libraries. Basically, passing "-L-L$path" to DMD causes it to pass "-L$path" to the linker, which is how one specifies linker search paths. T -- Tech-savvy: euphemism for nerdy.
