http://www.stlport.org/
http://downloads.sourceforge.net/project/stlport/STLport/STLport-5.2.1/STLport-5.2.1.tar.bz2
2、解压 STLport-5.2.1.tar.bz2 到 C:\STLport-5.2.1
添加 VC6 环境变量:
打开文件 C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT 修改:
set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%;C:\STLport-5.2.1\stlport
set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%;C:\STLport-5.2.1\lib
备注: C:\STLport-5.2.1\lib 目录在后面编译会生成
3、到命令行执行批处理:
C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT
然后再切换到目录:cd C:\STLport-5.2.1 执行:configure msvc6
此时可以看到如下信息:
“STLport Configuration Tool for Windows
Setting compiler: Microsoft Visual C++ 6.0
Setting platform: Windows XP
Done configuring 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 to
build unit tests and install them in bin folder.”
然后再切换到目录:cd C:\STLport-5.2.1\build\lib 执行: nmake /fmsvc.mak install
等待编译完成后
在 C:\STLport-5.2.1\bin 下面出现:
stlport.5.2.dll、stlportd.5.2.dll、stlportstld.5.2.dll
在 C:\STLport-5.2.1\lib 下面出现:
stlport.5.2.lib、stlport_static.lib、stlportd.5.2.lib、stlportd_static.lib、stlportstld.5.2.lib、stlportstld_static.lib
临时文件出现在 C:\STLport-5.2.1\build\lib\obj
执行 nmake clean 可以清除掉 *.o 文件
4、引用 STLport
VC6 菜单 【Tools -> Options -> Directories】 添加目录:C:\STLport-5.2.1\stlport (放最上面)
VC6 菜单 【Tools -> Options -> Library files】 添加目录:C:\STLport-5.2.1\lib
VC6 菜单 【Project -> Settings】-> C/C++ -> Code Generation 的 Use run-time &library 下面选择 Debug Multithreaded (Release 版选择 Multithreaded)