How to Use STLPort with Visual C++
This is the easiest way to start using STLPort with Visual C++:
- Unzip the STLPort files into a directory on your hard disk (mine is c:\stlport-4.0,
the following instructions use that as an example)
- In the VC6 IDE, go to Project|Settings, C/C++ tab, Category: Preprocessor.
- Add "__STL_NO_SGI_IOSTREAMS" to "Preprocessor definitions". This tells STLPort
to use the native VC6 iostream classes instead of its own (which require additional
- In the same window, add "c:\stlport-4.0\stlport" into "Additional include
directories." This tells the compiler to look here before the VC6 headers
when you include STL headers.
You can then use STLPort with that project. You'll need to repeat this for
each new project that you create. It's also possible to use the STLPort iostreams
library instead of the VC version, but that requires rebuilding the Visual C++
runtime library (which you may not want to do).