Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT Toolchain discovery (MinGW)(How does CDT's automatic toolchain discovery work?)
icon5.gif  CDT Toolchain discovery (MinGW) [message #508088] Fri, 15 January 2010 20:24 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 2
Registered: January 2010
Junior Member
Just out of curiosity: CDT seems to try to discover installed toolchains automatically (at eclipse startup?). How does it do it?

I've installed MinGW (5.1.6) and MSYS (1.0.10) to use it with Eclipse CDT (6.0) on Windows 7, following exactly the instructions in the help in "Before you begin". Everything worked fine after that but I noticed that the MinGW installation did not modify the path and also did not add any environment variables. Despite this, CDT worked nicely and detected the mingw toolchain.

Recently I had to rollback my system partition to a state before the MinGW and MSYS installation. That is, now MinGW and MSYS folders and files are still there (and both tools can of course be used if set properly in the path) but now CDT does not detect the toolchain automatically anymore. Does CDT rely on some registry key? Clearly it cannot use the path.

Regards
hjb
Re: CDT Toolchain discovery (MinGW) [message #508091 is a reply to message #508088] Fri, 15 January 2010 20:44 Go to previous messageGo to next message
Doug Schaefer is currently offline Doug SchaeferFriend
Messages: 135
Registered: July 2009
Senior Member
The CDT does try to look for MinGW at known locations. One of them you are running into is probably the registry (based on the MinGW uninstall info). We do default to C:\MinGW if everything else fails so I assume that's not where you installed it.
Re: CDT Toolchain discovery (MinGW) [message #508751 is a reply to message #508088] Wed, 20 January 2010 07:44 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: January 2010
Junior Member
How can I change the location where Eclipse looks for MinGW for a toolchain? Can I set some environment variable in a workspace?

I am using two installations of Eclipse and two different workspaces, one with a plugin environment which requires older version of mingw-gcc (3.4.5) and another in which I use the latest versions of gcc and gdb. I have two MinGW installations in different directories for this purpose.
Re: CDT Toolchain discovery (MinGW) [message #508756 is a reply to message #508088] Wed, 20 January 2010 08:38 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 2
Registered: January 2010
Junior Member
Yes I would also like to know how to do that. Setting a MINGW environment variable does not seem to have an effect. My current workaround, based on Doug's hint about the standard MinGW location, is to create an NTFS junction point at C:\MinGW that points to the directory of the MinGW version that I intend to use. However, that's not an option if you need to switch back and forth between versions I guess.

Frankly, although automatic toolchain detection may be useful, I'd rather prefer a simple configuration dialogue in the C/C++ preferences. Similar to how Java developers can add JDK entries manually or select the one they'd like to use from detected installations.
Re: CDT Toolchain discovery (MinGW) [message #508774 is a reply to message #508088] Wed, 20 January 2010 09:50 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: January 2010
Junior Member
I figured out that one place where eclipse looks for MinGW installation is in registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Min GW\InstallLocation.
Re: CDT Toolchain discovery (MinGW) [message #520060 is a reply to message #508088] Thu, 11 March 2010 01:07 Go to previous messageGo to next message
Michael is currently offline MichaelFriend
Messages: 2
Registered: July 2009
Junior Member
For the life of my i can't figure out why Eclipse cannot see my MinGW installation. I installed it using the automated windows installer and changed no settings. I checked the registry location mentioned, but it doesn't exist.
Re: CDT Toolchain discovery (MinGW) [message #520064 is a reply to message #520060] Thu, 11 March 2010 02:17 Go to previous message
Andrew Gvozdev is currently offline Andrew GvozdevFriend
Messages: 257
Registered: July 2009
Senior Member
You may want to try most recent CDT 7.0 build from http://download.eclipse.org/tools/cdt/builds/. There were some improvements how MinGW toolchain is discovered, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=195572

Andrew
Previous Topic:external build using eclipse(cdt) generated makefiles
Next Topic:C/C++ Indexer
Goto Forum:
  


Current Time: Thu Apr 18 07:53:27 GMT 2024

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

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

Back to the top