This article introduces two methods to compile C/C ++ using eclipse.Code
1. mingw + eclipse classic + CDT
(1) download and install mingw
Http://sourceforge.net/project/showfiles.php? Group_id = 2435
Install it in the first-level directory, such as D: \ mingw.
After installation, configure the environment variables as follows:
Mingw = D: \ mingw
Path = % mingw % \ bin; % PATH %
C_include_path = % mingw % \ include
Cplus_include_path = % mingw % \ Lib \ GCC \ mingw32 \ 4.6.2 \ include \ c ++; % c_include_path %
LIBRARY_PATH = % mingw % \ Lib
(2) install eclipse classic 4.2 and related plug-ins CDT
Http://www.eclipse.org/downloads/
Download eclipse classic 4.2
Go to the main interface, help-> install new softwares,
Under workwith, select Juno-
Http://download.eclipse.org/releases/juno,
You can install many plug-ins, such as programming extensions ages-> C/C ++ and CDT.
This method is recommended.
Ii. mingw + eclipse C/C ++ version
Eclipse for C/C ++ has a built-in CDT plug-in. You can directly download the eclipse for C/C ++ version.
Eclipse IDE for C/C ++ developers
Http://www.eclipse.org/downloads/
Usage:
File, new, C ++ project, makefile project, right other toolchain select mingw GCC.
Compile:
Right-click the generated makefile, select make targets, build, and standalone add, and enter the target name, such as hello, in the pop-up window.
After successful addition, double-click the added target to compile.
See: http://wenku.baidu.com/view/701977bf1a37f111f1855b7e.html