Пытаюсь получить пример программы SDL:
Код: Выделить всё
#include
#include
#include
int main(int argc, char *argv[])
{
// returns zero on success else non-zero
if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
printf("error initializing SDL: %s\n", SDL_GetError());
}
SDL_Window* win = SDL_CreateWindow("GAME",
SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED,
1000, 1000, 0);
while (1)
;
return 0;
}
Код: Выделить всё
clang -I/opt/homebrew/Cellar/sdl2/2.30.3/include -L/opt/homebrew/Cellar/sdl2/2.30.3/lib -lSDL2 -o main main.cpp
Код: Выделить всё
main.cpp:2:10: fatal error: 'SDL2/SDL_image.h' file not found
#include
^~~~~~~~~~~~~~~~~~
1 error generated.
Код: Выделить всё
/opt/homebrew/Cellar/sdl2/2.30.3/lib
/opt/homebrew/Cellar/sdl2/2.30.3/include
/opt/homebrew/Cellar/sdl2/2.30.3/include/SDL2
Код: Выделить всё
export CPATH=/opt/homebrew/include
export LIBRARY_PATH=/opt/homebrew/lib
Подробнее здесь: https://stackoverflow.com/questions/785 ... h-homebrew
Мобильная версия