To build the projects on OS X we’ll be using a simple makefile that will include the framework for us. The makefile assumes you’ve installed SDL following the instructions in the .dmg file on the SDL2 downloads page and now have it available as a framework.
If you’re unfamiliar with Makefiles a basic introduction can be found here.
The program we’re building for this lesson is a simple sanity check for SDL. It will
initialize the SDL video subsystem, check for any
errors and then quit.
The source file should be titled
main.cpp, or you can change the main.o build dependency
in the makefile to match your source file.
The program should run successfully but nothing should appear to happen if you’ve configured everything properly. If an error occurs make sure you’ve followed all the setup steps properly.
If you’re having any trouble setting up SDL please send an email or tweet.
I’ll see you again soon in Postscript 0: Properly Finding Resource Paths!