[转载]VC6下安装STLport-5.2.1
1. 下載STLPort。我下載的是STLport-5.2.1
?
2.?把下載的stlport壓縮包解壓,我假設解壓到C:/ STLport-5.2.1
?
在…\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT中,?把%STLport%\stlport;?,(注意有英文的分號)??加入Include路徑中;把%STLport%\lib;?,加入Lib路徑中;(這里現在%STLport%下沒有lib子目錄,先加上去,一會編譯會生成的):
set INCLUDE=C:\STLport-5.2.1\stlport;%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%
set LIB=C:\STLport-5.2.1\lib;%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%
打開cmd,運行剛才的這個VCVARS32.BAT;
?
?
3. Configuring STLport
在console窗口中進入C:/STLport-5.2.1,運行configure -help,你會看到一些可用的編譯選項。例如:使用winxp以上的操作系統在vc6環境下的命令是這樣的:
C:/STLport-5.2.1>configure msvc6?-p winxp
如果正確會出現
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.
4. Building STLport
(1) 設置環境變量,使得環境變量PATH中包含C:/Program Files/Microsoft Visual Studio 9.0/VC/bin
(2)?進命令行控制臺,?運行 C:/Program Files/Microsoft Visual Studio 9.0/VC中的vcvarsall.bat.如果正確會出現set environment for using Microsoft Visual Studio 2008 x86 tools.(所用機器不同可能不是x86) (C:/STLport-5.2.1/lib目前還不存在,但不用著急,編譯完stlport就有了)
(3) cmd進入C:/STLport-5.2.1/build/lib目錄運行
nmake /fmsvc.mak clean install ?
? ? ? ?如果正確會出現很長一段編譯,請耐心等待。成功后C:/STLport-5.2.1目錄下會增加兩個目錄(bin和 lib)
? ? ? (4)把bin目錄里的 stlport.5.2.dll, stlportd.5.2.dll, stlportstld.5.2.dll 復制到系統path的目錄(C:/Program Files/Microsoft Visual Studio 9.0/VC/bin)里去。
?
5.?配置vc
進入VC,在工具 選項 項目和解決方案 vc++目錄中 ?
選擇包含文件,加入C:/STLport-5.2.1/stlport,并調到最前面
選擇庫文件,加入C:/STLport-5.2.1/lib,并調到最前面
編譯工程,呵呵,應該通過了吧。同樣的,為了驗證我們用的是stlport的STL庫,把鼠標放到程序中vector和push_back上,右鍵到其定義處(goto the Definition of ...),在彈出的窗口,選中一個進入定義文件,可以看出引用的是C:/ STLport-5.2.1/stlport/stl/_vector.h了。
?
如此stlport 已經完全編譯好了,開始編程吧!
轉載于:https://www.cnblogs.com/xpowerlord/archive/2012/04/05/2433334.html
總結
以上是生活随笔為你收集整理的[转载]VC6下安装STLport-5.2.1的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: error LNK2019: 无法解析的
- 下一篇: jQuery实例——展示表格点击变色、全