Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Question on programatically adding an include to CDTprojects

Hi Nick,

 

This is a know issue. The path entries work in “one direction” with Managed Build projects now, i.e. when you modify Managed Build options, the changes are propagated to the path entries but not vice a versa. So include path entries you add are not propagated to the Managed Build System (MBS) currently. We are going to fix this with the New Project Model in 4.0.

As of now, you have to find and explicitly modify MBS tool options that represent include paths in your tool-chain in order to add include paths settings.

Let me know if you need more detail about how to do that programmatically.

 

Mikhail

 

 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Nick Sandonato
Sent: Tuesday, October 31, 2006 10:41 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Question on programatically adding an include to CDTprojects

 

Hello,

I've been stuck on this issue for a while now.  I'm attempting to add a library and an include entry for a CDT-based project.  I do this in the project creation wizard, after overriding performFinish() in a subclass of NewManagedCCProjectWizard using what I've come across in a few instances (just the includeEntry code for now):

IPathEntry[] entries = cProject.getRawPathEntries();
List<IPathEntry> newEntries = new ArrayList<IPathEntry>(Arrays.asList(entries));
IIncludeEntry incEntry = CoreModel.newIncludeEntry(newProject.getFullPath(), new Path("C:\\gsroot\\include\\systemc"), new Path("./"), false);

newEntries.add(incEntry);
                       
CoreModel.setRawPathEntries(cProject, (IPathEntry[]) newEntries.toArray(new IPathEntry[newEntries.size()]), null);
CoreModel.validatePathEntry(cProject, incEntry, true, true);


When executing, this adds the include path to the C/C++ Project view under the Includes container; however, attempting to compile will fail.  I've noticed that this directory is not being added to the subdir.mk file.

Am I missing something blatently obvious?  Or is there another way I should be going about this.

Thank you in advance,
Nick


Back to the top