Date: Sun, 13 Jan 2002 13:59:56 -0600 From: David Snopek To: slouken@devolution.com Subject: Compiling SDL with Borland C++ Building SDL with Borland C++

Building SDL with Borland C++

by David Snopek

These instructions cover how to compile SDL and its included test programs using either Borland C++ Builder 5 or the free Borland compiler.

Extract the files

Unzip the Borland.zip archive into this directory. Do not unzip it into any other directory because the makefiles use relative paths to refer to the SDL sources. This should create a directory named "Borland" inside of the top level SDL source directory.

Using Borland C++ Builder 5

Inside of the "Borland" directory there is a "bcb5" directory that contains a number of Builder project files. Double-click on the "libSDL.bpg" file icon. Once Builder has started click on the "Projects" menu on the menu-bar and go down to "Build All Projects" option. This will proceed to build SDL, SDLmain, and all the test programs.

Using the free Borland compiler

The free Borland compiler can be downloaded at no charge from the Borland website . Make sure that it is installed and properly configured.

Open an MS-DOS Prompt. Change to the "Borland\freebcc" directory under the SDL source directory. Type "make -f SDL.mak" to build SDL and "make -f SDLmain.mak". There are also makefiles for all of the test programs, if you wish to build them.

Output files

No matter which compiler you used, three important files should have been produced: Both of the *.lib files will need to be added to all the projects that use SDL and SDL.dll must be placed some where the Windows dynamic linker can find it (either in your project directory or on the system path, C:\WINDOWS\SYSTEM).

Test programs

Some of the test programs require included media files. Before trying to run any of the test programs, copy these media files from the "tests/" directory into the build directory.