日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Eclipse下C/C++環(huán)境搭建

一直都想在Eclipse下搭建一個C/C++的開發(fā)平臺,卻一直未能如愿。最近,終于成功了,其實很簡單。

 

  1. 我們需要一個cdt,這個可以在Eclipse官網(wǎng)下載。
  2. 我們需要MinGW——C/C++編譯平臺,下載后需要安裝,同時選中g(shù)++、MinGW Make,同時設(shè)置環(huán)境變量,將%MinGW_HOME%\bin設(shè)置到PATH中,然后我們可以通過命令行敲擊gcc,看是否有效果。
  3. 我們需要gdb——C/C++調(diào)試平臺,下載后安裝,默認(rèn)到MinGW_HOME就行。
  4. 我們開啟eclipse編譯一個C/C++工程,右鍵可以運行,調(diào)試。

安裝

設(shè)置環(huán)境變量

新建C項目

新建C++項目

來段HelloWorld

C的

C代碼

 
 
 
#include ﹤stdio.h>
#include ﹤stdlib.h>

int main(void) {
	puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
	return EXIT_SUCCESS;
}

控制臺編譯輸出

Console代碼

 
 
 
**** Build of configuration Debug for project c ****

**** Internal Builder is used for build               ****
gcc -O0 -g3 -Wall -c -fmessage-length=0 -osrc\c.o ..\src\c.c
gcc -oc.exe src\c.o
Build complete for project c
Time consumed: 14011  ms.   

控制臺結(jié)果輸出

Console代碼

 
 
 
!!!Hello World!!!

C++的

C++代碼

 
 
 
#include ﹤iostream>

using namespace std;

int main() {
	cout ﹤﹤ "!!!Hello World!!!" ﹤﹤ endl; // prints !!!Hello World!!!

	return 0;
}

控制臺編譯輸出

Console代碼

 
 
 
**** Build of configuration Debug for project cpp ****

**** Internal Builder is used for build               ****
g++ -O0 -g3 -Wall -c -fmessage-length=0 -osrc\cpp.o ..\src\cpp.cpp
g++ -ocpp.exe src\cpp.o
Build complete for project cpp
Time consumed: 25452  ms.  

控制臺結(jié)果輸出

Console代碼

 
 
 
!!!Hello World!!!

文章名稱:Eclipse下C/C++環(huán)境搭建
網(wǎng)站網(wǎng)址:http://www.dlmjj.cn/article/cceiihg.html