At the top of my program I have
#include "SDL/SDL_image.h"
And when I try to compile while using one of SDL_image’s functions, it says
load_image()
wasn’t declared in this scope. What things can I do to make sure everything is set up correctly?
I have included it in my linker settings.
The error message is from the compiler, not the linker. As such, your linker settings don’t make any difference.
If you are absolutely clueless, you can ask the compiler (preprocessor) to produce the preprocessed code it is trying to compile. (The relevant gcc option is
-save-temps) That way you can see ifload_imageis really declared. Maybe a conditional compilation option is excluding the declaration, or some include file is not found and you missed the error message.Also, if you are compiling C++ code, which I assume you are, the SDL stuff should be wrapped in
extern Cblocks (although I believe that would result in linker error). These may already be included in the SDL headers, however.If all else fails, upload the preprocessed output somewhere so we can take a look.
EDIT: According to SDL Image v1.2 documentation the image loader function is actually called
IMG_Loadand I see no mention ofload_image.