'“SDL.h” no such file or directory found' when compiling

后端 未结 6 938
情深已故
情深已故 2021-01-31 18:07

Here\'s a piece of my current Makefile:

CFLAGS = -O2 -Wall -pedantic -std=gnu++11 `sdl-config --cflags --libs` -lSDL_mixer

I have libsdl instal

6条回答
  •  遇见更好的自我
    2021-01-31 18:37

    If the header file is /usr/include/sdl/SDL.h and your code has:

    #include "SDL.h"
    

    You need to either fix your code:

    #include "sdl/SDL.h"
    

    Or tell the preprocessor where to find include files:

    CFLAGS = ... -I/usr/include/sdl ...
    

提交回复
热议问题