I'm working on a project in c++
that uses autotools for easy cross-compile. I've sudo make install
'd MXE on my system. When just using ./configure
, and thus using g++
, things run smoothly. However, using ./configure --host=i686-w64-mingw32
, I run into this error:
In file included from Game.cpp:1:0:
Game.hpp:4:22: fatal error: SDL2/SDL.h: No such file or directory
#include <SDL2/SDL.h>
After fishing around Google all day, I can't seem to find an indicator as to why. I know that when compiling on Win(currently on Ubuntu 15.04), the headers are named differently for SDL, but I'm still using a Unix compiler, according to my understanding. Do I need to have separate source for Windows, with a different include? I monitored the mxe install for errors and received none, so I can't conceive of that being the issue.
If needed, I can provide a more complete picture of the environment, but I believe this to perhaps be an OS specific error/caveat.
SDL2 headers should be included as follows:
Not:
Why?
Because when you run
sdl2-config --cflags
its outputs a path like thisinclude/SDL2
and if you do als
on it you will getSDL.h
notSDL2/SDL.h
.