Search code examples
c++build-processeclipse-cdt

Eclipse-CDT: Whats the best way to add a custom build step?


I have a file in my project which I need to compile using an external tool, and the output of that is a pair of .c and .h files.

Whats the best way to integrate this into my Eclipse-CDT build?

  • Ideally I can reference the external tool using a relative path
  • Ideally Eclipse will know if I change this file that it needs to re-run the external tool

I've tried out adding something to the 'Builders' section under Project Properties with mixed results.

thx

  • Alex

Solution

  • I got this working well by adding a 'Builder' of type 'Program'.

    1. Right click on the project
    2. Click "Properties", "Builders"
    3. Click "New", "Program", ...
    4. Add the location of the file you want to execute, as well as any command line arguments.