Comment 3 for bug 1872023

Revision history for this message
Alexandre-Xavier Labonté-Lamoureux (alexandrexavier) wrote :

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

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