Important: Please read the Qt Code of Conduct -

Qt and SDL error::Cannot open include file: 'SDL/SDL.h': No such file or directory

  • Hi I'm getting this error. Cannot open include file: 'SDL/SDL.h': No such file or directory
    I created a C++ project.
    In my .pro file I have
    @ LIBS += -LS:/SDL-1.2.15/lib/ -lSDL -lSDLmain
    INCLUDEPATH += S:/SDL-1.2.15/include@

    The location of the SDL library is located at S:\SDL-1.2.15.
    I downloaded Mingw32 version of SDL under Development from the SDL website

    This Is my man File
    @#include "SDL/SDL.h"

    int main()
    //Start SDL

    //Quit SDL
    return 0;


    #include "SDL.SDL.h" has no squigglys and it appears in the dropdown list when adding it. I check and the file does exist under


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you try to re-run qmake after you added the SDL lines to your pro file ?

Log in to reply