Setting up Eclipse CDT

来源:互联网 发布:数据挖掘实例分析 编辑:程序博客网 时间:2024/05/16 14:43

1. Download Eclipse IDE for C/C++ Developers, this is more handy than Eclipse CDT Plugin

Download URL: http://www.eclipse.org/downloads/index.php

2. Install minGW

We need compilers, right? minGW is recommended. Note that minGW stands for 'Minimalist GNU for Windows', thus it's easy to memorize. Follow the starter guide of http://mingw.org/.

Noteworthy: add the %MinGW_HOME%/bin to PATH.

Ensure the installation is OK:

MINGW

I configured the MinGW path in the Eclipse as a GCC compiler, but still encountered the following 2 errors, very unpleasant.

Eclipse CDT ERROR 1: Program "gcc" not found in PATH.

After setting the prefix of compiler, this error is gone, and I removed the prefix again, the error didn't appear, I don't know why.

1

Eclipse CDT ERROR 2: Program "make" not found in PATH

This is because there is no program name 'make' under 'C:\MinGW\bin' on default, so we need to rename the 'mingw32-make.exe' to 'make.exe'

ERROR 3: Binary not found.

Analysis: parser not set correctly, it works under the following configuration.

parser setting

helloworld