Change environment variables for own toolchain includes [message #1793810] |
Thu, 16 August 2018 04:56  |
Eclipse User |
|
|
|
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 07:47  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03151 seconds