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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1872023

Title:
  libsdl2-ttf-dev and libsdl2-dev headers not at the same place, causing
  compilation error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libsdl2-ttf/+bug/1872023/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to