Tuesday, January 26, 2010

Eclipse CDT incompatibility with Cygwin 1.7

Eclipse failed to detect the Cygwin GCC toolchain. Attempts to manually set the toolchain in project properties led to an error being displayed below the choice: "The configuration support is not installed on the system". This is because Eclipse gets Cygwin paths from the registry, and Cygwin 1.7 stopped storing them there. To fix the problem, I added the paths to the registry using a .reg file:


[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2]
"cygdrive prefix"="/cygdrive"
"cygdrive flags"=dword:00000022

[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/]

[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin]

[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib]

Customize the "native" values to point to your cygwin directory.


Anonymous said...

Exactly what I experienced.


Anonymous said...

Thank you!!
This solution fixed the problem i had with eclipse and cygwin

Anonymous said...

omg...read 4 houres several solutions, but that is it.

A comment on eclipse and/or cygwin web page would helpful

Giles said...

Great stuff - that's saved a lot of effort. Thanks

alesa said...

THANKS!!! I spent two days looking for this in Eclipse's web and documentation, and found nothing!

Anonymous said...

ok, but how do you do if you have 2 eclipse+CDT with different cygwin?

change registry each time?

nemelk said...


I was killing myselve why there is no cygwin toolchain in eclipse.

Wll you rort this to eclipse/cygwin?

Who is to blame?

Anonymous said...

I have a comp sci lab, and i think half the class is being slain by this problem. Awesome work on the solution!

Daryl said...

I am having the same problem but adding these values to the registry is not fixing it. My cygwin is installed to c:\tools\cygwin and I have updated the 'native' values appropriately, but still says the toolchain is incompatible. Any thoughts?

Boris Gjenero said...

Daryl, do you have all the necessary Cygwin development tools installed? If you want to see what Eclipse checks for, you can look in the Eclipse source code.

Andrew Smith said...

Thank you! Seems to work. Still having a problem with my exe not being created but I think that's a different issue. Cheers.

David M. said...

This worked perfectly for me, thank you!!

aaziz said...

I am sorry, its a very dumb question, can you please specify where to add the contents you mention in original post. I mean where to find the .reg file or the registry file.

Boris Gjenero said...

You can copy the text in the post, starting with REGEDIT4 and ending with the last "flags"=dword:0000000a", and put that into a .reg file. (The lines appear wrapped in the post, but they copy properly. The stuff between square brackets is all one line.)

You need to edit the text if cygwin isn't installed to C:\cygwin. Note how double backslashes are needed in a .reg file.

Bremen said...

hey, could u explain me where exacly i need to change this? Coz i dont know where to find that registry file. I would rly aprichiate it.