Eclipse+CDT+MinGW+MSYS+GDB 安装手册

来源:互联网 发布:房产php源码 编辑:程序博客网 时间:2024/05/18 03:29

Eclipse+CDT+MinGW+MSYS+GDB 安装手册

 

.            参考资料

http://wiki.eclipse.org/CDT/User/FAQ#Are_there_complete_HowTos_for_setting_up_the_CDT.3F

 

http://max.berger.name/howto/cdt/  (主要参考了这篇文档而来)

 

.            主要步骤

1 安装JDK(1.5) + Eclipse(3.2)
2
安装CDT3.1(eclipse3.2配套的版本是CDT3.1)
3
安装MinGW 5.1.4
4
安装MSYS 1.0
5
安装GDB 5.2.1(可选)

.            安装JDK(1.5) + Eclipse(3.2)

JDK1.5

http://java.sun.com/j2se/1.5.0/install.html

 

Eclipse3.2

http://archive.eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/index.php

 

.            安装CDT3.1(eclipse3.2配套的版本是CDT3.1)

 

http://www.eclipse.org/cdt/downloads.php

http://download.eclipse.org/tools/cdt/releases/callisto/dist/3.1.2/

http://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/callisto/dist/3.1.2/org.eclipse.cdt-3.1.2-win32.x86.zip

 

However, Eclipse 3.1 with CDT 3.0.0 (and 3.0.1) has a terrible bug on windows! If you are on windows, please close eclipse, and delete the file spawner.dll in eclise/plugins/org.eclipse.cdt.core.win32_3.0.0/os/win32/x86. This bug appears every time you try and run short programs (they will not show any output). More information is available in Eclipse Bug 102043. This bug is fixed in CDT 3.0.2 which should be released soon (Feb 2006).

 

安装CDT成功后的New->Project对话框

.            安装MinGW

MinGW下载列表

http://sourceforge.net/project/showfiles.php?group_id=2435

 

http://jaist.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.4.exe

 

http://downloads.sourceforge.net/mingw/MinGW-5.1.4.exe?modtime=1209244789&big_mirror=1

 

安装成功后添加 %MinGW安装目录%/binpath环境变量中

.            安装MSYS

MSYS-1.0.11-2004.04.30-1.exe下载地址

http://prdownloads.sourceforge.net/mingw/MSYS-1.0.11-2004.04.30-1.exe?download

 

安装成功后添加 %MSYS安装目录%/1.0/bin path环境变量中

 

.            安装GDB (可选)

gdb-5.2.1-1.exe下载地址

http://jaist.dl.sourceforge.net/sourceforge/mingw/gdb-5.2.1-1.exe

 

GDB安装目录与MinGW安装目录相同

.            相关资源

GDB下载

http://www.gnu.org/software/gdb/download/

 

MinGW+MSYS+GDB等下载列表

http://www.cnblogs.com/shanzy/articles/521934.html

http://blog.vckbase.com/bastet/archive/2005/04/26/4985.aspx

 

gdb-5.2.1-1.exe下载地址

http://jaist.dl.sourceforge.net/sourceforge/mingw/gdb-5.2.1-1.exe

 

Eclipse 老版本

http://archive.eclipse.org/eclipse/downloads/

 

 

九.            FAQ

1              A: 安装CDTeclipse中无法看到怎么办?

办法1.  -clean参数重启eclipse

办法2.  CDT单独解压,解压后只复制pluginsfeatures 2个目录到eclipse目录下

2              A: 相关环境变量的设置

C_INCLUDE_PATH=%MINGW_HOME%/include

LIBRARY_PATH=%MINGW_HOME%/lib

CPLUS_INCLUDE_PATH=%MINGW_HOME%/include/c++/3.4.5;%MINGW_HOME%/include/c++/3.4.5/mingw32;%MINGW_HOME%/include/c++/3.4.5/backward;%MINGW_HOME%/include

 

3              A: 编译不过的几种解决办法

办法1.  将“%MinGW%/bin/mingw32-make.exe”复制一份副本,重命名为“make.exe

办法2.  如果是eclipse3.33.4以后的版本,将cdt解压后plugins目录下的org.eclipse.cdt.core.win32_*.jar解压为目录,删除此jar包,重启