eclipse c/c++ CDT build just one file

Akronix picture Akronix · Nov 16, 2013 · Viewed 17.3k times · Source

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!

Answer

Akronix picture Akronix · Nov 16, 2013

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/