I have set up a development environment in VSCode with SDL2, SDL2_Image and MinGW. I am using this command to compile the program.
g++ -Isrc/include -Lsrc/lib -o main main.cpp -lmingw32 -lSDL2main -lSDL2 -lSDL2_image
I have SDL2_image.h in src/include/SDL2. I have libSDL2_image.(a/dll.a/la) all in src/lib. I have the SDL2_image.dll in the project folder.
I am including SDL_image like so
#include "SDL2/SDL_image.h"
The program will compile fine as along as I am not using the IMG_Load function, if I do it throws the error: undefined reference to `IMG_Load'.
To my knowledge, I have dragged all necessary files and included them in the appropriate folders. VSCode seems to recognize the file SDL_image.h, so I am unsure why the reference to IMG_Load remains undefined.