Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Change environment variables for own toolchain includes(Change environment variables for own toolchain includes for error parser)
Change environment variables for own toolchain includes [message #1793810] Thu, 16 August 2018 08:56 Go to next message
Michael Schneider is currently offline Michael SchneiderFriend
Messages: 3
Registered: July 2018
Junior Member
Hi everyone,

I managed to get a own toolchain working. I used the "org.eclipse.cdt.build.crossgcc" as example and base and modified the plugin.xml, some of the java code and plugin.properties.

The result is that I got several configurations working and the toolchain is calling our compiler and linker with some custom target options.

But I want to get the error parser in the editor working correctly. Until now, I suppose that it got something to do with the "Preprozessor Include Paths" in Eclipse CDT Project Settings. Is this correct?

There I only see some mingw library paths and so on until now.

Our compiler is using some custom libraries and a own environment variable to find them, not the "path" variable.

I already found out, that this issue might have got something to do with the "org.eclipse.cdt.core.LanguageSettingsProvider" entry and the "languageSettingsProvider" and "configurationEnvironmentSupplier" java classes specified in the toolchain.

But I do not really understand the code behind it and where I can change this path?

Thank you very much for Ideas, kind regards, Michael
Re: Change environment variables for own toolchain includes [message #1793820 is a reply to message #1793810] Thu, 16 August 2018 11:47 Go to previous message
Michael Schneider is currently offline Michael SchneiderFriend
Messages: 3
Registered: July 2018
Junior Member
I think I have found a solution for this.

In the "Extensions" tab of your plugin project, add the new subentry "(envVarBuildPath)" to your compiler.

Set "variableList" to the environmentvariable name and create yourself a java class, which you enter in "buildPathResolver".

then implement the java class like this:
public class myPathResolver implements IBuildPathResolver {

	@Override
	public String[] resolveBuildPaths(int pathType, String variableName, String variableValue,
			IConfiguration configuration) {
and return a String Array with the include dirs for the error parser.
Previous Topic:Introducing the Arduino C++ IDE
Next Topic:Direct Remote C++ Debugging error running gdb
Goto Forum:
  


Current Time: Fri Nov 16 02:12:04 GMT 2018

Powered by FUDForum. Page generated in 0.01491 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top