> Thanks for the pointer to STLPort. Once I compile it, how to I get
> the code to work with MinGW? Do I simply replace MinGW files with
> STLPort files of the same name?
No, you should never do this.
> On confusing point is that MinGW has include files spread across a
> number of including directories. It's not always obvious to me which
> is being used for compiling C++ on Windows.
You do not need to care about it. After you `make' STLport (in my case,
located at D:\STLport-4.6.2), all you need to do generally is add
`-ID:\STLport-4.6.2\stlport' in front of other includes in the
compilation line (CXXFLAGS in Makefile), and add
`-lstlport_mingw32_static' to the linker option (LDFLAGS in Makefile),
assuming the built .a files are copied to the MinGW lib directory.
A one-line compilation command could be like:
g++ -ID:\STLport-4.6.2\stlport test.cpp -lstlport_mingw32_static
g++ -ID:\STLport-4.6.2\stlport -D_STLP_USE_DYNAMIC_LIB test.cpp
g++ -ID:\STLport-4.6.2\stlport -D_STLP_NO_OWN_IOSTREAMS test.cpp
The first is for static linking with STLport, the second for dynamic
linking, and the last for directly using only the header files.
Not all methods work in all cases.