how to add library and library path programmatically [message #1143426] |
Fri, 18 October 2013 07:15 |
Henrik Rentz-Reichert Messages: 261 Registered: July 2009 |
Senior Member |
|
|
Hi,
I achieved to add include paths to a C project description along the lines
ICProjectDescription projectDescription = CoreModel.getDefault().getProjectDescription(project, true);
ICConfigurationDescription configDecriptions[] = projectDescription.getConfigurations();
for (ICConfigurationDescription configDescription : configDecriptions) {
ICFolderDescription projectRoot = configDescription.getRootFolderDescription();
ICLanguageSetting[] settings = projectRoot.getLanguageSettings();
for (ICLanguageSetting setting : settings) {
if (!"org.eclipse.cdt.core.gcc".equals(setting.getLanguageId())) {
continue;
}
List<ICLanguageSettingEntry> includes = new ArrayList<ICLanguageSettingEntry>();
includes.add(new CIncludePathEntry(src_gen, ICSettingEntry.LOCAL));
setting.setSettingEntries(ICSettingEntry.INCLUDE_PATH, includes);
}
}
try {
CoreModel.getDefault().setProjectDescription(project, projectDescription);
} catch (CoreException e) {
e.printStackTrace();
}
But when I do that in a similar way for libraries and library paths
List<ICLanguageSettingEntry> libPaths = new ArrayList<ICLanguageSettingEntry>();
libPaths.add(new CLibraryPathEntry(mingw_debug, ICSettingEntry.LOCAL));
setting.setSettingEntries(ICSettingEntry.LIBRARY_PATH, libPaths);
then I realize that the settings aren't stored because the kind isn't supported by the store.
Where do I have to store library paths and library files?
Thanks,
Henrik
|
|
|
Powered by
FUDForum. Page generated in 0.03375 seconds