Building STLport-4.5.3 on mingw-2.4 using gcc-3.2

HOW TO: Build STLport-4.5.3 on mingw-2.4 with gcc-3.2

By: Adrian Lanning

Date: 05 / 07 / 03



When I tried to build STLport-4.5.3 using mingw 2.4 with gcc 3.2, I got errors.

Build Configuration

I used the make program in the /mingw/bin directory, but I think the one that comes with MSYS should work too.

Problem1: ctime

The problem I encountered was ctime trying to include:

../g++-v3/ctime which didn't exist.

This occurs because ctime tries to include the native ctime using _STLP_NATIVE_INCLUDE_PATH but the stl_gcc.h file sets:

#define _STLP_NATIVE_INCLUDE_PATH ../g++-v3
which is the wrong include dir.


This occurs because in mingw 2.4 with gcc 3.2 the native stl headers are in:



To fix this, comment out the above #define and type:


NOTE: Since /include is already in the standard include path, we don't need to explicitly say:


Problem 2: Regression Testing

Now I ran into another problem. The regression tests don't build giving an error regarding:

... _string_io.c:82: template-id `ctype<_CharT>'
		used as a declarator


The reason is that _STLP_NO_OWN_IOSTREAMS doesn't work with gcc 3.0 (see release notes) and the gcc.mak file sets _STLP_NO_OWN_IOSTREAMS.


Just edit the above define out of the makefile and it should work. :)