Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Integrating a custom toolchain in Eclipse for multiple host systems
Integrating a custom toolchain in Eclipse for multiple host systems [message #1700390] Thu, 02 July 2015 11:13
Max Dev is currently offline Max DevFriend
Messages: 1
Registered: July 2015
Junior Member
Hey guys Smile

I have a custom GCC toolchain that compiles binaries for my operating system project. I'm having problems with integrating this toolchain in Eclipse CDT to have proper preprocessing and error checking.

On Windows, the toolchain resides in the Cygwin directory "C:/cygwin/ghost", and on other hosts it resides in "/ghost".

Preprocessor:
I've tried to configure the project to use a "Cross compiler" toolchain and set the "Command to get compiler specs" under "C/C++ General -> Preprocessor Include... -> Providers -> CDT Cross GCC Built-in Compiler Settings" to use my compiler (namely i686-ghost-g++). This results in the include paths in my attachment being determined.

Well, this is obviously correct for the compiler but does not work on Windows, because the compiler does not emit the "C:/cygwin" part of the path. Is there a way to define a prefix for these?

Builder's environment:
I'm using plain old bash scripts to build applications; on unix-like systems they run within the normal environment, but on Windows they must be run within the Cygwin environment (so the necessary tools are properly found).

I tried setting the "C/C++ Build -> Builder Settings -> Build command" to sh build.sh to get my scripts used. This does not work with the Cross compiler toolchain setting, as they run in the Windows environment, not in the Cygwin environment. I can fix this by switching to the Cygwin toolchain configuration and setting the "C/C++ Build -> Environment -> PATH" variable properly, but this does not make sense as I also want to use the same project settings on non-Windows systems, too.

Questions:
How is it meant to be done? My goal is to have Eclipse automatically determine the include paths & therefore correctly preprocess sources; also being able to run my build scripts within the correct environment per system.

If configuration is not suitable for this: Where can I find information on how to create a custom toolchain? With that it might be possible to implement it so that it automatically determines what environment to use on each system and how to determine include paths.

Any help is greatly appreciated!
Greets
  • Attachment: 434FC.png
    (Size: 5.79KB, Downloaded 140 times)
Previous Topic:Eclipse does not save settings
Next Topic:0 Problems, "Errors exist in a required project"
Goto Forum:
  


Current Time: Thu Apr 25 18:12:29 GMT 2024

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

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

Back to the top