I'm trying to build a windows executable for a C++ application I've made that uses SDL2, and SDL_Image. I've seemingly managed to include the SDL libraries and headers just fine, but now I'm trying to include the SDL_Image ones. The command I'm currently using is as follows:
i686-w64-mingw32-gcc -lSDL2main -lSDL2 -I ~/SDL/SDL2-devel-2.0.22-mingw/SDL2-2.0.22/i686-w64-mingw32/include -L ~/SDL/SDL2-devel-2.0.22-mingw/SDL2-2.0.22/i686-w64-mingw32/lib -o main32.exe main.cpp
But this gives me the error
main.cpp:4:10: fatal error: SDL2/SDL_image.h: No such file or directory
4 | #include <SDL2/SDL_image.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
I am aware that SDL_Image is a separate plugin, and I have already installed it.
What directory(s) do I need to specify to include SDL_Image in the build?
I'm on Ubuntu 22.
Edit: I have found the correct directories, and I now have the following command:
i686-w64-mingw32-gcc -lmingw32 -lSDL2main -lSDL2 -lSDL2_image \
-I /home/nick/SDL/SDL2-devel-2.0.22-mingw/SDL2-2.0.22/i686-w64-mingw32/include \
-L /home/nick/SDL/SDL2-devel-2.0.22-mingw/SDL2-2.0.22/i686-w64-mingw32/lib \
-I /home/nick/SDL/SDL2_image-devel-2.6.0-mingw/SDL2_image-2.6.0/i686-w64-mingw32/inclulde \
-L /home/nick/SDL/SDL2_image-devel-2.6.0-mingw/SDL2_image-2.6.0/i686-w64-mingw32/lib \
-o main32.exe main.cpp
However, the command still gives me the same error. I have checked, and I am sure that the header file it cannot find is is the correct place.