vc9下stlport-5.2.1的安裝

來源:互聯網
上載者:User

 

1.下載STLPort。我下載的是STLport-5.2.1 

2.把下載的stlport壓縮包解壓,我假設解壓到C:/ STLport-5.2.1

3, Configuring STLport
在console視窗中進入C:/ STLport-5.2.1,運行congfigure –help,你會看到一些可用的編譯選項。例如:使用winxp以上的作業系統在vc9環境下的命令是這樣的:

C:/STLport-5.2.1>configure msvc9 -p winxp

如果正確會出現

STLport Configuration Tool for Windows
Setting compiler: Microsoft Visual C++ 2008
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) 再進入 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 已經完全編譯好了。Enjoy it !

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.