I was trying to build my project using Clang++ instead of G++ and I got this issue. I don't use libsdl2-ttf-dev inside my project, but it's installed on my system. I do use SDL2 and SDL2_image. To be clear, G++ compiles my project fine. Clang++ does not. It spits build errors very similar to this one:
1 error generated.
In file included from ticcmd.cpp:22:
In file included from /usr/include/SDL2/SDL_endian.h:31:
In file included from /usr/include/SDL2/SDL_stdinc.h:31:
In file included from /usr/include/SDL2/SDL_config.h:4:
In file included from /usr/include/x86_64-linux-gnu/SDL2/_real_SDL_config.h:33:
/usr/include/x86_64-linux-gnu/SDL2/SDL_platform.h:179:10: fatal error: 'begin_code.h' file not found
I was trying to build my project using Clang++ instead of G++ and I got this issue. I don't use libsdl2-ttf-dev inside my project, but it's installed on my system. I do use SDL2 and SDL2_image. To be clear, G++ compiles my project fine. Clang++ does not. It spits build errors very similar to this one:
1 error generated. SDL2/SDL_ endian. h:31: SDL2/SDL_ stdinc. h:31: SDL2/SDL_ config. h:4: x86_64- linux-gnu/ SDL2/_real_ SDL_config. h:33: x86_64- linux-gnu/ SDL2/SDL_ platform. h:179:10: fatal error: 'begin_code.h' file not found
In file included from ticcmd.cpp:22:
In file included from /usr/include/
In file included from /usr/include/
In file included from /usr/include/
In file included from /usr/include/
/usr/include/
My project: https:/ /github. com/AXDOOMER/ MeshGlide
Samuel's workaround worked. I was able to compile my project like this:
clang++ *.cpp -std=c++14 -g -lglfw -lGL -lGLU -lSDL2 -lSDL2_image -lzmq -I/usr/include/SDL2 -o MeshGlide