C++ – Change output directory of an Eclipse CDT project


I cannot find the possibility to change the output of the built files. The only I've found deactivates the whole generated makefile process, which I don't want to.

Best Solution

  1. Right-click on your project and choose Properties.
  2. Go under C/C++ Build, under Settings.
  3. Click on the Build Artifact tab.
  4. Under "Output prefix", enter the directory that you want to contain your built file (including a trailing slash).

It looks like you'll also need to modify your Run / Debug Settings with the updated path.

(However, writing your own makefile really isn't hard, especially if you use Eclipse's generated makefiles as a starting point, and it can give you a lot more flexibility.)