# HG changeset patch # User Sam Lantinga # Date 1030205737 0 # Node ID 25f475cd4981879230c924bd666053084fb03454 # Parent 1c4be4a164109520ef067ee47830422da26fc749 Updated the Borland C++ projects (thanks Dominique!) diff -r 1c4be4a16410 -r 25f475cd4981 Borland.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Borland.html Sat Aug 24 16:15:37 2002 +0000 @@ -0,0 +1,137 @@ + + + + Building SDL with Borland's C++ compilers + + + + + +

Building SDL with Borland's C++ compilers.

+ by David Snopek + and updated by Dominique + Louis.
+
+ These instructions cover how to compile SDL and its included test programs + using either Borland C++ Builder 5, 6 for Windows, +C++ Builder for Linux ( AKA Kylix 3 ) or the free Borland C++ command-line compiler.
+ +

Extract the files

+ +

Unzip the Borland.zip archive into this directory. Do not unzip + it into any other directory because the makefiles ( *.mak ) and project +files ( *.bpr ) 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, 6 for Windows +

+ +

Inside of the "Borland" directory there is a "bcb6" 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 ( with Borland's calling convention ), SDLmain, +and all the test programs. Currently, all the test programs +are dynamically linked to Sam Lantinga's SDL.dll.

+ +

NOTE : Borland's "lib" format and Microsoft's "lib" format are incompatible. + 
+ If you wish to dynamically link to the SDL library supplied by Sam Lantinga +in each release, I have created the correct *.libs for SDL 1.2.4 and they +exist in the "/lib" directory.
+ If you would like to create the *.lib files yourself, you will need to make +use of Borland's "implib.exe" utility.
+

+ +

IMPLIB works like this:

+ +
    IMPLIB (destination lib name) (source dll)
+ +

For example,

+ +
    IMPLIB SDL.lib SDL.dll
+ +

This assumes that SDL.dll was compiled with Visual C++ or similar.
+

+ +

To learn more about the difference between Borland's and Microsoft's *.lib +format please read the article here.
+

+ +


+ NOTE :
The C++ Builder for Windows project format, is not compatible +with the Kylix 3 project format, hence the reason why they are in separate +directories.

+ +

Using the free Borland C++ command-line 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). + +

Using Borland C++ Builder for Linux ( AKA Kylix +3 )

+ +

Inside of the "Borland" directory there is a "k3" 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 all the test programs
+ Linux users do not need *.lib files as the Shared Object is linked right +into the project ( very neat actually, Windows should do this sort of thing +as it is a lot easier for the developer ).
+ NOTE : The C++ Builder for Windows project format, is not +compatible with the Kylix 3 project format, hence the reason why they are +in separate directories.

+ +

On Mandrake 8.1 the shared objects for SDL are located in the /usr/lib + directory as libSDL_*.so and the Mesa OpenGL shared objects are located in + /usr/X11R6/lib as libGL*.so
+
+ So if your setup is different you may need to change the project file + so that they re-link to the ones on your system.
+
+ On Mandrake 8.1 the headers files are located at /usr/include/SDL/. +So if you you have not installed the development RPMs ( usually named libSDL-devel* + ) for SDL ( not included ) you may have to change the include directory +within some of the projects.
+

+ +

Known Problems

+ The only known problem is that I ( Dominique Louis ), was unable to create +the projects that rebuilt the SDL shared objects under Linux, due to time +constraints and my lack of intimate knowledge of Linux. +

Test programs

+ Some of the test programs require included media files ( *.wav; *.bmp etc + ). Before trying to run any of the test programs, copy these media files + from the "tests/" directory into the Borland build directory that you extracted + the project files to.
+
+ + + diff -r 1c4be4a16410 -r 25f475cd4981 Borland.zip Binary file Borland.zip has changed diff -r 1c4be4a16410 -r 25f475cd4981 BorlandC.html --- a/BorlandC.html Sat Aug 24 15:29:06 2002 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -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. - - - - - diff -r 1c4be4a16410 -r 25f475cd4981 Makefile.am --- a/Makefile.am Sat Aug 24 15:29:06 2002 +0000 +++ b/Makefile.am Sat Aug 24 16:15:37 2002 +0000 @@ -19,9 +19,9 @@ EXTRA_DIST = \ BUGS \ TODO \ - COPYING \ - CREDITS \ - INSTALL \ + COPYING \ + CREDITS \ + INSTALL \ README \ README.AmigaOS \ README.CVS \ @@ -35,21 +35,21 @@ README.Qtopia \ README.WinCE \ README-SDL.txt \ - BorlandC.html \ + Borland.html \ Borland.zip \ - VisualC.html \ - VisualC.zip \ + VisualC.html \ + VisualC.zip \ VisualCE.zip \ - MPWmake.sea.bin \ + MPWmake.sea.bin \ CWprojects.sea.bin \ PBProjects.tar.gz \ EpocBuildFiles.zip \ - WhatsNew \ - docs.html \ + WhatsNew \ + docs.html \ sdl.m4 \ - SDL.spec \ - autogen.sh \ - strip_fPIC.sh + SDL.spec \ + autogen.sh \ + strip_fPIC.sh # M4 macro file for inclusion with autoconf m4datadir = $(datadir)/aclocal