事實證明 沒先做功課 做事真的很累人 事半功倍啊>"<

先裝了 Eclipse 再加裝 CDT

建了專案後, 無法 compiler

再裝了 WinGW

設定 Properties -> C/C++ Build -> Settings -> Binary Parsers -> PE Windows Parser 勾選後提到最上面

Properties -> C/C++ General -> Paths and Symbols -> Includes -> Add...
\user\MinGW\include

解決找不到 stdio.h 等問題, 還是無法 compiler

Window -> Show View -> Make Target -> 專案上右鍵 -> New... -> 命名後會出現一個新節點
點兩下後編譯

 

文章很亂, 請參考下面作者的文章

Reference: 使用 Eclipse 開發 C 及 C++ ( CDT + MinGW )

 

補充

在進行上述設定後仍無法執行, build 後出現錯誤但未提示錯誤是什麼即位置

Launch fail. Binary not found.

 

I even faced this error and searched a lot to fix. Fortunately, I figured it out myself.

The following are the things you need to make sure they are set:

Windows > Preferences > C/C++ > New CDT project wizard > Makefile Project > Binary Parsers

a) Set it to Windows PE Parser if you are on windows.

b) Set it to Cygwin PE Parser if you are using Cygwin

Windows > Preferences > C/C++ > Build > Environment

Now click on "select" and select "Path" variable so that you add you path variables in Eclipse.

Now its all done!

All you have to do is write a test program and press Ctrl+B (Build all; there is a button on menu bar) and after that click "Run".

arrow
arrow
    文章標籤
    Eclipse CDT WinGW Make Target
    全站熱搜

    Nola 發表在 痞客邦 留言(0) 人氣()