BorlandC.html
author Sam Lantinga <slouken@libsdl.org>
Wed, 20 Mar 2002 02:37:44 +0000
changeset 313 67ad846ed21c
parent 274 051b991765ba
permissions -rw-r--r--
*** empty log message ***
slouken@274
     1
Date: Sun, 13 Jan 2002 13:59:56 -0600
slouken@274
     2
From: David Snopek <xevol@newtonave.net>
slouken@274
     3
To: slouken@devolution.com
slouken@274
     4
Subject: Compiling SDL with Borland C++
slouken@274
     5
slouken@274
     6
<html>
slouken@274
     7
<title>Building SDL with Borland C++ </title>
slouken@274
     8
<body>
slouken@274
     9
slouken@274
    10
<h1>Building SDL with Borland C++ </h1>
slouken@274
    11
<b> by <a href=mailto:xevol@users.sourceforge.net> David Snopek </a> </b> 
slouken@274
    12
slouken@274
    13
<br>
slouken@274
    14
<br>
slouken@274
    15
slouken@274
    16
These instructions cover how to compile SDL and its included test programs using either 
slouken@274
    17
Borland C++ Builder 5 or the free Borland compiler. <br>
slouken@274
    18
slouken@274
    19
<h3> <b> Extract the files </b> </h3>
slouken@274
    20
slouken@274
    21
<p> Unzip the Borland.zip archive into <b>this</b> directory.  Do not unzip it into any 
slouken@274
    22
other directory because the makefiles use relative paths to refer to the SDL sources.  This 
slouken@274
    23
should create a directory named "Borland" inside of the top level SDL source directory. 
slouken@274
    24
</p>
slouken@274
    25
slouken@274
    26
<h3> <b> Using Borland C++ Builder 5 </b> </h3>
slouken@274
    27
slouken@274
    28
<p> Inside of the "Borland" directory there is a "bcb5" directory that contains a number 
slouken@274
    29
of Builder project files.  Double-click on the "libSDL.bpg" file icon.  Once Builder has 
slouken@274
    30
started click on the "<u>P</u>rojects" menu on the menu-bar and go down to 
slouken@274
    31
"B<u>u</u>ild All Projects" option.  This will proceed to build SDL, SDLmain, and all 
slouken@274
    32
the <a href="#tests">test programs</a>. </p>
slouken@274
    33
slouken@274
    34
<h3> <b> Using the free Borland compiler </b> </h3>
slouken@274
    35
slouken@274
    36
<p> The free Borland compiler can be downloaded at no charge from <a href="http://www.borland.com/bcppbuilder/freecompiler/"> the 
slouken@274
    37
Borland website </a>.  Make sure that it is installed and properly configured. </p>
slouken@274
    38
slouken@274
    39
<p> Open an MS-DOS Prompt.  Change to the "Borland\freebcc" directory under the 
slouken@274
    40
SDL source directory.  Type "make -f SDL.mak" to build SDL and "make -f 
slouken@274
    41
SDLmain.mak".  There are also makefiles for all of the <a href="#tests">test 
slouken@274
    42
programs</a>, if you wish to build them. </p>
slouken@274
    43
slouken@274
    44
<h3> <b> Output files </b> </h3>
slouken@274
    45
slouken@274
    46
No matter which compiler you used, three important files should have been produced:
slouken@274
    47
 
slouken@274
    48
<UL>
slouken@274
    49
	<LI> SDL.dll </LI>
slouken@274
    50
	<LI> SDL.lib </LI>
slouken@274
    51
	<LI> SDLmain.lib </LI>
slouken@274
    52
</UL>
slouken@274
    53
slouken@274
    54
Both of the *.lib files will need to be added to all the projects that use SDL and SDL.dll 
slouken@274
    55
must be placed some where the Windows dynamic linker can find it (either in your 
slouken@274
    56
project directory or on the system path, C:\WINDOWS\SYSTEM).
slouken@274
    57
slouken@274
    58
<a name="tests">
slouken@274
    59
<h3> <b> Test programs </b> </h3>
slouken@274
    60
</a>
slouken@274
    61
slouken@274
    62
Some of the test programs require included media files.  Before trying to run any of the 
slouken@274
    63
test programs, copy these media files from the "tests/" directory into the build directory.
slouken@274
    64
slouken@274
    65
</body>
slouken@274
    66
</html>
slouken@274
    67
slouken@274
    68