1

INSTALLING THE SDL GRAPHICAL API (Penton, Appendix C)

Installation

The two SDL library files are on the CD and on my webpage under "online resources"

Make sure you install both SDL and SDL_TTF, which handles fonts for text displays

Programs that use SDL need to be distributed with the SDL.DLL and SDL_TTF.DLL

dynamic link libraries, also on the CD and in the demo projects

SDL Installation Overview…3 STEPS:

1) download, unzip and install the libraries on the C: drive.

2) configure Microsoft Visual C++to tell it where the libraries are located.

3) Then, for every project, an additional entry must be made in the link tab of the

project settings menu (but you don't need to do this if you always start with Generic Project folder)

We will go through this once in class. you'll need to perform steps 1 and 2 on your computer at home. After today, we will use existing project shells already configured with the appropriate link instructions so we don't have to worry about step 3

Detailed Instructions for step 1

1)click on the links below, download and unzip the two SDL libraries, expand them both into C:/Program Files/SDL (make an SDL directory in program files)

SDL Downloads:
SDL_ttf-2p0p5.zip
SDL-1p2p4.

Detailed Instructions for step 2

1)To help visual C++ locate SDL, open VC++ and choose Tools> Options

2)Click on the directories tab

3)Make sure "platform:" says Win32

4)Make sure "show directories for:" says "include files"

5)Click the dotted square button below the "show directories for:" box

6)A new box appears below the last entry of the list. In this box, type the location of your SDL include library ( something like C:\Program Files\SDL\SDL-1.2.4\INCLUDE), or better: browse to SDL-1.2.4\INCLUDE wherever you put it.

7)After entering the pathname, press enter, highlight the SDL include and click the up arrow button (next to the X button) until the SDL 1.2.4 include directory is at the top of the list

8)Repeat steps, 5-7 for the TTF File, which is in SDL\SDL_TTF-2.0.5\INCLUDE and put at top of list

9)Change " show directories for: " so it says libraries, create a new box and brouse over to the SDL\SDL-1.2.4\LIB directory. Move to top

10)Repeat step nine for the SDL\SDL_TTF-2.0.5\LIB directory. Move to top

Step 3 Instructions: Refer to Penton p853. If you always start with an existing working project then you will not have to do step 3.

1