eclipse安裝C/C++外掛程式cdt

來源:互聯網
上載者:User

下載cdt解壓到外掛程式目錄後仍然提示錯誤: Cannot run program "gcc": ?????????¨?

網上找了許久,試n種辦法均不成。

最後,還是用eclipse自己help -> New and insall software... -> Available Software Sites 在列表裡找有沒有http://download.eclipse.org/tools/cdt/releases/helios 如果沒有就add,有就打勾給取個名cdt。然後在work with:type or select a site那選剛才取名的cdt。下面就是等,然後下一步,再很久的等,呵呵,下載很慢。不過裝好後就搞定上面的錯誤了。

另外安裝MinGW,直接下載exe的安裝即可。(這個mingw-get-inst-20110316,360報有木馬,只能下mingw-get-inst-20100831.exe)
http://sourceforge.net/projects/mingw/files/

MinGW安裝比較慢,因為是線上安裝,需要遠程下載依賴的庫檔案。預設安裝在C:\MinGW下。 安裝完成後需要將C:\MinGW\bin;加到Path環境變數最前面。
安裝完成後在cmd下輸入gcc -v,看下輸出的是什麼吧。

在eclipse第一次運行自己寫的程式的時候可能出現報錯資訊:launch failed Binary not found。這是因為沒有指定編譯器資訊。

    解決辦法是:

   Window->Preferences->C/C++->New CDT project wizard->Makefile Project
找到 Binary Parser 取消 Elf Parser 改選 PE Windows Parser。重啟eclipse,重建立立工程項目,啟動並執行時候會出來binarys節點,它自己可以找到執行檔案。

=========================================

Eclipse 3.3版的需要用cdt4(cdt4.03)。下載後,安照說明安裝:

To use this zip file, in the menu Help->SoftwareUpdates->Find and Install..., select Search for new features to install, click New Archived Site..., and point at the zip file. The Update Manager will start up and you can select the features you want to install. You will at nead require the C/C++ Development Tooling feature which is the CDT runtime.

更多版本的cdt下載:http://download.eclipse.org/tools/cdt/builds/

聯繫我們

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