Linking to static libraries

Minas minas_mina1990 at hotmail.co.uk
Thu May 10 05:55:05 PDT 2012


I have a static library (libDerelictSDL2.a) in 
/usr/lib/Derelict3. What I want to to is just link to that. My 
code does not use anything from it.

My .d file is icy.d.

I try to compile using:

a) dmd icy.d -I/usr/lib/Derelict3 -L-lDerelictSDL2
b) dmd icy.d -L-I/usr/lib/Derelict3 -L-lDerelictSDL2
c) dmd icy.d -L-lDerelictSDL2

None works, and the error is:



/usr/bin/ld: cannot find -lDerelictSDL2
collect2: ld returned 1 exit status
--- errorlevel 1

Why can't it find it? I have set the linker's path correctly (I 
think).


More information about the Digitalmars-d-learn mailing list