1 2================================================== 3STLport README for Borland C++ compilers. 4================================================== 5 6by: Francois Dumont, dums@stlport.com, last edited 20 May 2006 7 8============ 9Introduction 10============ 11This document describes how STLport can be compiled and used with 12Borland compilers. 13 14For any further comments or questions visit STLport mailing lists 15http://stlport.sourceforge.net/Maillists.shtml or forums 16https://sourceforge.net/forum/?group_id=146814 17 18============= 19Prerequisites 20============= 21To build and use STLport you will need following tools and libraries: 22 - Borland C++ compiler package 5.5.1 or higher version. 23 24 In order to build STLport the Borland compiler and linker have to 25 be correctly configurated too. That is to say: 26 27 * For the Borland compiler bcc32: 28 29 In Borland's 'bin' directory (same directory as bcc32.exe), create a 30 bcc32.cfg file containing the compiler option giving it the path to 31 native Borland headers: 32 33 -I%BORLAND_PATH%\BCC55\include 34 35 * For the resource compiler brcc32: 36 37 Create an environment variable INCLUDE containing path to native Borland 38 headers and especially the windows.h file 39 40 set INCLUDE=%BORLAND_PATH%\BCC55\include 41 42 * For the Borland linker ilink32: 43 44 You need to give path to both the Borland libs and Borland PSDK libs. 45 For that you have to create, in the same directory as ilink32.exe, a 46 configuration file, ilink32.cfg, that contains: 47 48 -L%BORLAND_PATH%\BCC55\lib;%BORLAND_PATH%\BCC55\lib\PSDK 49 50 - A GNU make tool. You can get one from www.mingw.org or www.cygwin.com. 51 See README.mingw or README.cygwin for additional informations. 52 53=================== 54Configuring STLport 55=================== 56 This is intended to be an optional step, if you want to use default 57configuration simply jump to next chapter 'Building STLport'. Open a console 58and go to the STLport build/lib folder. Run 59 60 configure --help 61 62 This command will present you the different available build options. Just follow 63the instructions to set STLport configuration according your needs. For example, 64to set the typical configuration for most Borland compilers, run 65 66 configure -c bcc 67 68================ 69Building STLport 70================ 71 This is a step by step description of the actions to take in order to build 72and install the STLport libraries: 73 741. Open a console, you can use a Msys, Cygwin or Windows console. 75 762. Go to the STLport build/lib folder: 77 cd C:\STLport\build\lib 78 793. Run the following command: 80 make -fbcc.mak install 81 82 Where 'make' is the GNU make utility you have installed. The name of 83GNU make utility may differ, such as 'mingw32-make'. -f is a make option 84telling it which makefile to use. You have of course to choose the 85appropriate makefile for your compiler, 'bcc.mak' in our case. 86 87 Once the command returns you will have all the necessary import libraries 88in STLport's 'lib' folder and DLLs in STLport's 'bin' folder. For a 89description of the generated libraries check the FAQ file in the 'doc' folder. 90For a quick start guide to the STLport make system, see the README file in the 91'build/lib' folder. 92 93=============== 94Testing STLport 95=============== 96You can use the unit tests to verify STLport behaves correctly. Change into 97STLport's 'build/test/unit' folder and type: 98 99 make -fbcc.mak install 100 101This will build and install the unit tests with STLport dynamic libraries. 102Once the unit tests are built you just need to run them. They can be found 103in STLport's bin, bin-g or bin-stlg folders. To rebuild the unit tests 104with STLport static libraries, type: 105 106 make -fbcc.mak clean 107 make -fbcc.mak install-static 108 109============= 110Using STLport 111============= 112Adjust your include and link paths in Borland IDE or in the command line config 113files. In the include files add the path to STLport's 'stlport' folder. Make sure 114it is the first directory listed there. Add STLport's 'lib' folder for the library 115files (order of paths doesn't matter here). 116 117Now you should be ready to use STLport. 118 119============ 120Known limitations 121============ 122 1231. If you extend a locale facet based on a Standard facet definition you will 124have to grant your own facet id defition. Ex extracted from 125test/unit/fstream_test.cpp: 126 127#include <locale> 128 129using namespace std; 130 131struct my_state { 132 char dummy; 133}; 134 135struct my_traits : public char_traits<char> { 136 typedef my_state state_type; 137 typedef fpos<state_type> pos_type; 138}; 139 140class my_codecvt : public codecvt<char, char, my_state> 141{}; 142 143// Mandatory locale facet id definition: 144template <> 145locale::id codecvt<char, char, my_state>::id; 146 1472. If you get a linker memory error, e.g. LME351, it probably means that full 148source debugging is enabled and Borland's .TDS file has exceeded the memory 149capacity of Borland's linker (ilink32.exe). To resolve this error, check 150Borland's website for the latest patch for ilink32.exe. In the alternative, 151disable full source debugging in build\Makefiles\gmake\bcc.mak by deleting 152the -v option in the OPT settings. 153 1543. For "'uname' is not recognized . . .", see "Configuring STLport" above. 155