1. Download stlport. I downloaded a STLport-5.2.1.
2. decompress the downloaded stlport package, I suppose to decompress it to C:/STLport-5.2.1
3. Processing ing stlport
Go to the C:/STLport-5.2.1 in the console window and run congfigure-help, and you will see some available compilation options. For example, the command in the vc9 environment for operating systems above WINXP is as follows:
C:/STLport-5.2.1> Configure msvc9-P WINXP
If it is correct
Stlport Configuration tool for Windows
Setting Compiler: Microsoft Visual C +++ 2008
Setting platform: Windows XP
Done processing ing stlport.
Go to build/lib folder and type "nmake clean install" to build and
Install stlport to the "lib" and "bin" folders.
Go to build/test/unit folder and type nmake clean install
Build unit tests and install them in Bin folder.
4. building stlport
(1) set environment variables so that the environment variable path contains C:/program files/Microsoft Visual Studio 9.0/VC/bin
(2) go to the command line console, run c: /program files/vcvarsall in Microsoft Visual Studio 9.0/VC. BAT. if it is correct, set environment for using Microsoft appears. Visual Studio 2008x86 tools. (different machines may not be x86) (C:/STLport-5.2.1/lib does not exist at present, but don't worry, compiled stlport will have)
(3) run in the C:/STLport-5.2.1/build/lib directory
nmake/fmsvc. mak clean install
if it is correct, it will take a long time to compile. Please be patient. After the successful C:/STLport-5.2.1 directory will add two directories (bin and Lib)
(4) Put the bin directory in stlport.5.2.dll, stlportd.5.2.dll, copy stlportstld.5.2.dll to the system path directory (C:/program files/Microsoft Visual Studio 9.0/VC/bin.
5. Configure VC
Go to VC, and in the VC ++ directory of the tool Options Project and Solution
Select include file, add C:/STLport-5.2.1/stlport, and move to front
Select the library file, add C:/STLport-5.2.1/lib, and tune to the front
Compile the project. Similarly, to verify that we use the stlport STL library, place the mouseProgramIn vector and push_back, right-click its definition (goto the definition ...), in the pop-up window, select a to enter the definition file, we can see that the reference is C:/STLport-5.2.1/stlport/STL/_ vector. h.
So far, stlport has been fully compiled. Enjoy it!