Search code examples
c++visual-studiovisual-c++sdlsdl-2

Cannot open source file "SDL2/SDL.h" Microsoft Visual Studio


Help ! I installed SDL2 , I set up all Directions in its place and added lib too But it says Cannot open source file "SDL2/SDL.h" I did what I can do Please Help

#include <SDL2/SDL.h>

The problem

I installed SLD2 and Prepared all directions in Microsoft vs but still nothing the same proplem


Solution

  • So yeah I fixed it I forgot that / set up directions So SDL2/SDL.h means that the header file is in folder called SDL2 and the SDL.h header file was in the include folder so SDL.h was attached directly and all what I did was removing SDL2/ from the header file

    #include <*SDL2/*SDL.h>