I followed this guide http://lazyfoo.net/SDL_tutorials/lesson03/windows/codeblocks/index.php to set up the sdl image extension but now when i compile anything with #include “SDL_image.h” it gives me the error “cannot find -lSD” what can i do to fix this?
I followed this guide http://lazyfoo.net/SDL_tutorials/lesson03/windows/codeblocks/index.php to set up the sdl image extension but now
Share
Please make sure that your linker options are correct, so you would put the flags:
-lSDLmain -lSDL -lSDL_image
and that you actually have these files (they will be either .so or .lib files) somewhere that the compiler can see them. If they are not in the directory where the IDE checks then you will need to specify the location with the -L flag. The -L flag works like so: -L”/path/to/lib/here/”
As you are getting “cannot find -lSD” it would suggest that you may have accidentally put -lSD instead of the full name of -lSDL.