0

I'd like to use Eclipse IDE for C++ dev but these is one little prob.

First, a little boiler plate:

  • mingw 64bit C++ compiler (Custom compilation A)
  • mingw 64bit C++ compiler (Custom compilation B)
  • windows host

The problem
I can not get it to work with multiple toolchains. All info I could find suggested that eclipse requires mingw dir to be at C:\mingw\

that does not work for my use case. For one, I have multiple custom compiled mingw compiler tools. I can at most put one at C:\mingw\ (Obviously).

This implies to me that Eclipse does not support multiple custom toolchains for C++.

If this is not the case, please explain how one can hook up Eclipse to use multiple compilation toolchains.

To keep thing simple let's make some base assumptions:

Location of goodies:
D:\mingw_cust1\mingw\
D:\mingw_cust2\mingw\

When I make a new project in eclipse I'd like to be able to choose which toolchain I want for that project.

  • possible duplicate of [how to add custom tool chain to eclipse CDT](http://stackoverflow.com/questions/3489607/how-to-add-custom-tool-chain-to-eclipse-cdt) – Claudiordgz Mar 27 '14 at 15:43
  • First of all, there was no answer there. Second, this is about multiple toochains. Third, if you've used this place before you know not to send people on wild goose chases all over the web with links that don't even answer the question asked. – user3469154 Mar 27 '14 at 16:09
  • I suggest you read the [Guidelines on How to ask a question on Stackoverflow](http://stackoverflow.com/questions/how-to-ask), going on a wild goose chase is done **before** asking, clearly you have not tried what says on this question, since you are not posting the problem with the procedure – Claudiordgz Mar 27 '14 at 16:24
  • Btw you do need a custom tool chain, eclipse will not find your multiple c++ compiler **toolchains** by some miracle. I suggest trying something before asking. – Claudiordgz Mar 27 '14 at 16:26
  • You are clearly a troll mate. I'm a long time stackposter. I made new account only because the dumb login mechanism on stack locked me out due to the yahoo secuity bug. I already told you I tried everything reasonable and you are once again without any knowldeg regeritating that I tried nothing. Try something? If you'd have any experience with the topic you would know that this likely isn't even possible with eclipse. – user3469154 Mar 27 '14 at 16:56
  • Your eclipse setup is common actually. The format of your question makes me not believe you about being a long time "stackposter". – Claudiordgz Mar 28 '14 at 14:03

1 Answers1

0

The question is old & maybe obvious but I spent time trying to answer it for myself.

The easiest way to switch MinGW path in a project is probably to change the MINGW_HOME variable.

To change it : Project > Properties > C/C++ Build > Environment > MINGW_HOME field

Once changed the origin of MINGW_HOME is "USER: CONFIG" instead of "BUILD SYSTEM" and therefore the parameter is project-specific (or even configuration-specific)

In my case I could set "D:\mingw_cust2\mingw\" (2) instead of "D:\mingw_cust1\mingw\" (1) inherited from the os 'PATH' where it was above the (2)

One could also set the toolchain for the whole workspace (and have a workspace per toolchain) by setting the MINGW_HOME variable in Window > Preferences > C/C++ > Build > Environment

Gadam
  • 69
  • 5