SDL: Undefined reference to IMG_LOAD [Solved]

By nick | Code
30 Nov 2011

If you’re trying to get SDL_Image to work correctly and are getting the following error:

undefined reference to `IMG_Load`

Here’s how to fix it:

Go to your compiler link options, in code and add

-lSDL_image

Codeblocks Linker Options for SDL

 

Leave a Reply