If you have not installed SDL2
then do the following:
brew install sdl2
On Apple Silicon hardware go to this directory
cd /opt/homebrew/Cellar/sdl2
Copy the content fromm /include/sdl2
into your include
folder (It should be a folder called SDL2 that contains a bunch of .h files.)
Go to lib
and copy the contents (some folders and some .a and .dylib files) into /lib
in VScode project
The add the follwing to Makefile
INCLUDES= -I ./include
LIBRARIES= -L lib -l SDL2-2.0.0
FLAGS= -g
all:
gcc ${FLAGS} ${INCLUDES} ${LIBRARIES} ./src/main.c -o ./bin/main