1 2 ================================================== 3 STLport README for Borland C++ compilers. 4 ================================================== 5 6 by: Francois Dumont, dums (a] stlport.com, last edited 20 May 2006 7 8 ============ 9 Introduction 10 ============ 11 This document describes how STLport can be compiled and used with 12 Borland compilers. 13 14 For any further comments or questions visit STLport mailing lists 15 http://stlport.sourceforge.net/Maillists.shtml or forums 16 https://sourceforge.net/forum/?group_id=146814 17 18 ============= 19 Prerequisites 20 ============= 21 To 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 =================== 54 Configuring STLport 55 =================== 56 This is intended to be an optional step, if you want to use default 57 configuration simply jump to next chapter 'Building STLport'. Open a console 58 and 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 63 the instructions to set STLport configuration according your needs. For example, 64 to set the typical configuration for most Borland compilers, run 65 66 configure -c bcc 67 68 ================ 69 Building STLport 70 ================ 71 This is a step by step description of the actions to take in order to build 72 and install the STLport libraries: 73 74 1. Open a console, you can use a Msys, Cygwin or Windows console. 75 76 2. Go to the STLport build/lib folder: 77 cd C:\STLport\build\lib 78 79 3. Run the following command: 80 make -fbcc.mak install 81 82 Where 'make' is the GNU make utility you have installed. The name of 83 GNU make utility may differ, such as 'mingw32-make'. -f is a make option 84 telling it which makefile to use. You have of course to choose the 85 appropriate makefile for your compiler, 'bcc.mak' in our case. 86 87 Once the command returns you will have all the necessary import libraries 88 in STLport's 'lib' folder and DLLs in STLport's 'bin' folder. For a 89 description of the generated libraries check the FAQ file in the 'doc' folder. 90 For a quick start guide to the STLport make system, see the README file in the 91 'build/lib' folder. 92 93 =============== 94 Testing STLport 95 =============== 96 You can use the unit tests to verify STLport behaves correctly. Change into 97 STLport's 'build/test/unit' folder and type: 98 99 make -fbcc.mak install 100 101 This will build and install the unit tests with STLport dynamic libraries. 102 Once the unit tests are built you just need to run them. They can be found 103 in STLport's bin, bin-g or bin-stlg folders. To rebuild the unit tests 104 with STLport static libraries, type: 105 106 make -fbcc.mak clean 107 make -fbcc.mak install-static 108 109 ============= 110 Using STLport 111 ============= 112 Adjust your include and link paths in Borland IDE or in the command line config 113 files. In the include files add the path to STLport's 'stlport' folder. Make sure 114 it is the first directory listed there. Add STLport's 'lib' folder for the library 115 files (order of paths doesn't matter here). 116 117 Now you should be ready to use STLport. 118 119 ============ 120 Known limitations 121 ============ 122 123 1. If you extend a locale facet based on a Standard facet definition you will 124 have to grant your own facet id defition. Ex extracted from 125 test/unit/fstream_test.cpp: 126 127 #include <locale> 128 129 using namespace std; 130 131 struct my_state { 132 char dummy; 133 }; 134 135 struct my_traits : public char_traits<char> { 136 typedef my_state state_type; 137 typedef fpos<state_type> pos_type; 138 }; 139 140 class my_codecvt : public codecvt<char, char, my_state> 141 {}; 142 143 // Mandatory locale facet id definition: 144 template <> 145 locale::id codecvt<char, char, my_state>::id; 146 147 2. If you get a linker memory error, e.g. LME351, it probably means that full 148 source debugging is enabled and Borland's .TDS file has exceeded the memory 149 capacity of Borland's linker (ilink32.exe). To resolve this error, check 150 Borland's website for the latest patch for ilink32.exe. In the alternative, 151 disable full source debugging in build\Makefiles\gmake\bcc.mak by deleting 152 the -v option in the OPT settings. 153 154 3. For "'uname' is not recognized . . .", see "Configuring STLport" above. 155