Header file for SDL_Overlay
问题 I plan to use both SDL_GetKeyboardState and SDL_Overlay but it seems there is a conflict. #include <stdio.h> #include <SDL/SDL.h> #include <SDL2/SDL.h> int main() { const Uint8 *keystate = SDL_GetKeyboardState(NULL); SDL_Overlay *bmp; printf("hello world!"); } Compile: gcc -c main.cpp When order of headers are: #include <SDL/SDL.h> #include <SDL2/SDL.h> error: ‘SDL_GetKeyboardState’ was not declared in this scope const Uint8 *keystate = SDL_GetKeyboardState(NULL); ^ or #include <SDL2/SDL.h>