Using the suggested #include "SDL.h" gives a bunch of errors, but "SDL2/SDL.h" doesn't. Why?

I can’t really find you the source, but I’m 200% sure I read somewhere explicitly that using the classic #include <SDL2/SDL.h> is wrong, and you have to do #include "SDL.h" with the quotes in order for sdl2-config --cflags --libs to work its magic.

I was using clangd autocompleter, and it gave me a bunch of errors and stuff until I changed to "SDL2/SDL.h"

Can you explain why this is so? And what I should do?


Ryan Gordon told me, he is at fault :stuck_out_tongue_winking_eye:

#include “SDL.h” works fine for me, did you add the SDL include folder to your build?