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
    http://www.libsdl.org/download-1.2.php

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

    int main()
    {
    //Start SDL
    SDL_Init( SDL_INIT_EVERYTHING );

    //Quit SDL
    SDL_Quit();
    
    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
    S:\SDL-1.2.15\include\SDL

    Thanks


  • 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
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.