0

I've read many posts on SDL_Image library, but I still cannot solve my problem.

I have #include "SDL/SDL_image.h" at the top, but when I go to compile it says

"cannot find -lSDL_image".

I have the SDL2_image.dll with the main, double checked that I have the correct versions of both SDL and SDL_image, and have also tried "SDL_image" under the linker options, but nothing seems to work.

Raja Simon
  • 10,126
  • 5
  • 43
  • 74
Joshua
  • 1
  • 2

1 Answers1

0

You are trying to link to SDL_image (for SDL 1.2), but what you really want is to link to SDL2_image (for SDL 2.0+). Try changing your linker options to point to SDL2_image and change your include line to point to the SDL2_image header (likely "SDL2/SDL_image.h").

Jonny D
  • 2,244
  • 15
  • 22