Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse c/c++ CDT build just one file

Tags:

I'm doing a C++ project with eclipse CDT but It takes a lot of time building all the source files.

I'd prefer just build the one source file which I'm working with until it's correct and later go ahead to the next source file. But all the options I have seen of eclipse (Make project and Build all), work over all the source files of the project.

Is there any easy way to build just one or two source files in eclipse CDT?

Thank you!

like image 928
Akronix Avatar asked Nov 16 '13 20:11

Akronix


People also ask

What is Eclipse CDT builder?

The CDT is Eclipse's C/C++ Development Tooling project. It is an industrial-strength C/C++ IDE that also serves as a platform for others to provide value-added tooling for C/C++ developers.

Can I compile C on Eclipse?

Eclipse is popular for Java project development. It also supports C/C++, PHP, Python, Perl, and other web project developments via extensible plug-ins. Eclipse is cross-platform and runs under Windows, Linux and Mac OS.

How do I change to C in Eclipse?

In Eclipse, go to the "File" menu, then "New", then "C++ Project" if it's there. If not, choose "Project", then find "C/C++" in the list of wizards, click the "+" sign to expand it, and choose "C++ Project". A dialog box will ask whether to open the C/C++ perspective.


1 Answers

It was much easier than expected.

  1. Deselect Project -> Build Automatically
  2. Right click on the file you want to build
  3. Click on Build Selected File(s).

Source: http://www.cesareriva.com/single-file-compile-in-eclipse-cdt/

like image 84
Akronix Avatar answered Sep 21 '22 15:09

Akronix