Simple and Fast Multimedia Library

SFML (Simple and Fast Multimedia Library) is a portable and easy-to-use API for multimedia programming. We will be using this library for the follow functionality;

Installing SFML (need to do this only once)

  1. Download version 2.1 (32-bit for Visual Studio 2012) from here. Save the SFML-2.1 folder to your C:\ Drive.
  2. Edit your PC's 'PATH' variable to allow you app to find the SFML DLL's
  3. Create a new Environment Variable called SFML_SDK, set it's value to also be the SFML directory e.g. "C:\SFML-2.1\"

Building a Visual Studio 2012 project to use SFML &OpenGL

Create a new "Win32 Console Application" Project.

Make the following changes to project properties (see screen-shot)

  1. select "VC++ Directories"
  2. select "all configurations"
  3. add "$(SFML_SDK)\include" to the list of include directories
  4. add "$(SFML_SDK)\lib" to the list of library directories
  5. Finally, delete the contents of your cpp file and paste in the code below (double click on the code to select);
  6. Press F5 to build and run...