I'm having problems using the library (libbox2d.a) with my project and I'm a bit confused as to how the header file (Box2D.h) fits into all of this. I tried searching the forums for a solution but I couldn't find one.
Here is my makefile:
Here is my makefile:
Code:
SOURCES = $(wildcard src/*.cpp)
OBJECTS = $(SOURCES:.cpp=.o)
LIBPATH += -L"/System/Library/Frameworks/OpenGL.framework/Libraries"
FRAMEWORK = -framework GLUT
FRAMEWORK += -framework OpenGL
LIBPATH += -L./library
LIBS = -L -lGL -lGLU -lBox2D
CXXFLAGS = -W -Wall -g
CXX = g++
MAIN = hello_world
all: $(MAIN)
clean:
rm -f src/*.o src/*.d $(MAIN)
$(MAIN): $(OBJECTS)
@$(CXX) $(FRAMEWORK) -o $@ $(LIBPATH) $(OBJECTS) $(LIBS)
I've placed libbox2d.a in a folder /library/ relative to my project path. Where does the Box2D.h file go and how can it be incorporated into my project?OBJECTS = $(SOURCES:.cpp=.o)
LIBPATH += -L"/System/Library/Frameworks/OpenGL.framework/Libraries"
FRAMEWORK = -framework GLUT
FRAMEWORK += -framework OpenGL
LIBPATH += -L./library
LIBS = -L -lGL -lGLU -lBox2D
CXXFLAGS = -W -Wall -g
CXX = g++
MAIN = hello_world
all: $(MAIN)
clean:
rm -f src/*.o src/*.d $(MAIN)
$(MAIN): $(OBJECTS)
@$(CXX) $(FRAMEWORK) -o $@ $(LIBPATH) $(OBJECTS) $(LIBS)