1 The MinGW GNU make command can be used to build STLport with different 2compilers 3 4- gcc (native compiler): 5 6 Makefile : gcc.mak 7 8 Notes: 9 10 1. Static library (archive) 11 12 If you use the static version of the STLport libraries 13 you have to define the _STLP_USE_STATIC_LIB macro in order 14 to have your executable linked correctly. 15 16 2. Shell 17 18 You will need MSys in order to build STLport. 19 20 Be carefull about what make command you are using. STLport comes with a 21 GNU make build system design for unix like platforms, make files have not 22 been adapted for the Windows platform. So you have to use the make command 23 coming with the MinGW package 'mingw32-make' and not the one coming with MSys 24 that is a portage of the GNU make for Windows. 25 26 3. Threading configuration 27 28 STLport libraries are built per default in order to be used in a 29 multithreaded environment. Under MinGW it means that we use the '-mthread' 30 compiler option. Don't forget to add it to your compiler command line too 31 if you want to use STLport libraries. You can also ask for not thread 32 safe libraries using the --no-thread configure script option. 33 34 4. Linking 35 36 In this environment STLport is almost complete replacement for libstdc++. 37 It means that when you were linking with libstdc++ (-lstdc++) you only have 38 to replace it with STLport (-lstlport.5.2 for instance) and with libsupc++ 39 containing language compiler support (lsupc++). However default gcc 40 behavior is to automatically link libstdc++ and a number of other system libs. 41 To avoid this behavior you have to use the -nodefaultlibs compiler option and 42 explicitely give all libraries by yourself. See build of unit tests to see what 43 library you might need, here is the list when this note was written: 44 45 -lstlportg.5.2 -lsupc++ -lgcc_s -lmingw32 -lmingwex -lmsvcrt -lm -lmoldname 46 -lcoldname -lkernel32 47 48- Borland C++ compiler: 49 50 Makefile : bcc.mak 51 52- Digital Mars C++ compiler: 53 54 Makefile : dmc.mak 55 56