Windows開發環境搭建

來源:互聯網
上載者:User

申明:下面的連結在你看到的時候可能已經失效,那麼你可以去微軟網站上搜尋相關詞語找到相應資源

一、C/C++ 環境

如果要使用Windows的特性,那麼光有標準C++編譯器還不夠,還需要使用Windows發布的platform sdk。 一般Windows的IDE環境中包括了一套SDK,比如Visual Studio 6.0裡麵包括了Microsoft Platform SDK, August 2001 Edition,要想知道怎樣使用SDK,那麼應該知道怎樣使用MSDN(the Microsoft Developer Network),通過尋找MSDN,你可以找到Windows SDK中提供的API描述和使用方法。 如果需要進行驅動開發,那麼你還需要Windows DDK(Microsoft Windows Driver Development Kit)和文檔(Microsoft Windows DDK Documentation)。

推薦學慣用搭配
Visual c++ 8.0 Express(Express 版不支援外掛程式,所以你的Visual Assistant用不了,對標準c++文法支援很好)
http://www.microsoft.com/express/download/
最新的windows platform sdk
http://msdn2.microsoft.com/zh-cn/express/aa700755(en-us).aspx
最新的MSDN
http://www.microsoft.com/express/download/msdn/Default.aspx

怎樣在Visual c++ 8.0 Express 中使用SDK可以參看http://msdn2.microsoft.com/zh-cn/express/aa700755(en-us).aspx,我翻譯過來如下:
1. 下載並安裝Visual c++ 8.0 Express
2. 下載並安裝Windows platform sdk
3. 開啟VC 8.0 Express,選擇菜單Options,開啟Options對話方塊,選擇Projects and Solutions
    將下面路徑添加到相應的地方:

  • Executable files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin
  • Include files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Include
  • Library files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Lib

4.更新corewin_express.vsprops檔案,從C:/Program Files/Microsoft Visual Studio 8/VC/VCProjectDefaults 下面找到該檔案,將
AdditionalDependencies="kernel32.lib"
改為
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
5.測試你的環境
VC 8.0 Express中,Win32 Windows Application 在Win32 Application Wizard是不能使用的,找到%ProgramFiles%/Microsoft Visual Studio 8/VC/VCWizards/AppWiz/Generic/Application/html/1033/目錄下的AppSettings.htm ,開啟該檔案,將441-444行前面的注釋去掉,如下所示:
// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;
儲存並關閉,開啟VC8,選擇菜單File->New,選擇Win32->Win32 Console Application template ,完成後按F5鍵編譯並運行該程式。

二、MASM
如果對彙編比較熟悉,那麼使用MASM(Microsoft Macro Assembler,微軟宏彙編)也是不錯的選擇,編寫MASM程式,對程式的骨架和Windows API有更深刻的瞭解。

編譯器,連結器,資源編輯器,標頭檔和Lib庫,常式可以從下面的網站免費擷取
http://www.masm32.com/

如果對MSAM不瞭解,首先需要一本講解MASM的書,《Windows環境下32位組合語言程式設計》是不錯的入門書籍,在使用MASM編程之前應該好好看一下這本書。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.