Cannot find -lSDL

Hello.

I was trying to compile a SLD program and i get this link time error: Cannot find -lSDL

This does not surprise me since in my lib folder i have only:
libSDL.dll.a
libSDL.la
libSDLmain.a

So it obviously cant find the file libSDL.a, but the tutorials i’ve seen around all tell me to link that (those could be outdated tutorials of course), the ones im folowing mainly are the lazyfoo ones.

Theese are fresh downloaded SDL dev libs, so i didnt mess around with them.

What am i doing wrong here?

heres my linking options:
-lmingw32 -lSDLmain -lSDL

and my search paths for the compiler and the linker are set currectly, im sure of it.

ginkgobitter wrote:

Replace -lSDL with -lSDL.dll and you should be ready to go :slight_smile: For -lSDL to work (static linking) you would have to have a libSDL.a which of course your compiler cannot find.

Ahh ok.

Thats what i’ve been doing, but i thought i should also have libSDL.a so i just wanted to check if i wasn’t missing anything. Thanks for the help :slight_smile:

Replace -lSDL with -lSDL.dll and you should be ready to go :slight_smile: For -lSDL to work (static linking) you would have to have a libSDL.a which of course your compiler cannot find.