We have our own GCC based compiler. We use eclipse in order to develop .c files using our compiler – after hitting the build button eclipse manages to run our ‘make’ file and the build operation succeeds. We’re trying to configure the eclipse project such that it will use this compiler in order to show the compilation errors as red underline marks during the code-writing stage.
In order to do so, we add the following configurations:
- Project properties > C/C++ Build>Tool chain editor > current toolchain: “Cross GCC”, current builder: “CDT internal builder”
- Project properties > C/C++ Build>Settings>Tool Settings>Cross Settings> - here I set the prefix and the path of my GCC compiler.
- Project properties > C/C++ General > Preprocessor include path, Macro etc. > providers > check: “CDT Cross Build Output Parser” and inside check “Allocate console in the console view”.
After doing that we get the following error in the console view:
i486-elf-g++ -E -P -v -dD C:/Users/workspace/.metadata/.plugins/org.eclipse.cdt.managedbuilder.core/spec.C Cannot run program "i486-elf-g++": Launching failed Error: Program"i486-elf-g++" not found in PATH
It looks like eclipse is trying to compile a file named “spec.C”, in the plugin directory. We tried to look for that file and we only found an auto-generated file called “spec.c” (lower case .c) that is empty.
Our compiler executable name is “i486-elf-gcc”.
What additional steps need to be done?
Note that running the make file using the “build” button completes without errors or warnings.
Thanks