I am going off of LazyFoo's SDL2 tutorials for C++ using the MinGW g++ compiler (using console). I have followed his page here, step-for-step. I have finally come across this error after having downloaded his example.
I have seen plenty of people online struggle with SDL_Image, but I've not yet seen this and I haven't found any solution to it yet.
(this question my sound redundant, but I've yet to come across a solution that applies to console-compilation)
Based on the comments above, the answer seems to be:
You need to install the development libraries for SDL_image.
You can download them here: https://www.libsdl.org/projects/SDL_image/ (look under the heading "Development libraries").
You need to ensure the path where the libSDL2_image.a
file resides is in the linker search path. One way of doing this is to add an appropriate -L
parameter to the link command. You could also drop the file in the default library search path.