Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Creating an Eclipse CDT Plugin to read a file from the project root and set include paths

There is no really include paths for the project, since CDT builds mostly not managed. I.e. for makefile project CDT just calls make and include paths 
are managed by make itself. Instead of writing a plugin it may be easier
in this case replace the make command with command
which will deal with your json and call make, that does not require any plugins
just changing project configuration.
There is such thing as cdt managed project but in this case it won't be driven by make at all, you can look at the code of this in CDT to see how it implements calling of compiler and linker to see if you want to do something similar but I don't recommend it.
For file and project changes google for eclipse resource change listeners.

On Mon, Aug 22, 2016 at 8:12 PM, Can Selcik <cselcik@xxxxxxxxxxxxx> wrote:
Hi everyone,

Could someone direct me to some tutorial or example code to get me
started on this?

Let's say I have a Makefile project but this project is run through a
custom build script that would take the include paths from a file called
'include-spec.json' and assign them to environment variables before
calling Make.

I want to write a simple Eclipse CDT plugin that reads this file and
sets the include paths for the project. Reading the file and parsing
JSON part is no problem. How can I have an Eclipse CDT plugin that can
change the include paths for the project? Also can someone point me to
the hooks that get called when a file is changed or the project is

I do apologize if this is a simple question and documentation is
available somewhere obvious to some of you. Unfortunately my search
didn't yield much.

Can Selcik
cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top