I am trying to include the SDL library in my c++ project. I have installed the SDL2.framework and included it in Library/Frameworks. I have also run the following commands in the terminal:
brew install SDL2
brew install SDL2_Image
However, when I try to compile using my makefile:
OBJS=texture.cpp window.cpp
LFLAGS=-lSDL2 -lSDL2_image
CURRDIR=`pwd`
.PHONY: test
all: test
test: $(OBJS) test.o
g++ -std=c++11 -Wall $(OBJS) test.o $(LFLAGS)
test.o: test.cpp
g++ -c -std=c++11 -DSPRITEFILENAME="\"$(CURRDIR)/sprites.png\"" -Wall test.cpp -o test.o
I get the following error:
./texture.h:7:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
^
1 error generated.
make: *** [test.o] Error 1
Any help will be appreciated.