Win2k Command Window Can't Execute G++

Andy Koppe
Sun May 31 14:15:00 GMT 2009

2009/5/31 Roger Head:
> Thanks for the reply, Matt. I don't have a really good idea of how Cygwin and
> Windows are both supposed to be able to handle .LNKs to e.g. G++, but a dump of
> g++.exe.lnk shows strings for /etc/alternatives and L:\cygwin\etc\alternatives.
> So yes, I don't know if Windows is supposed to be able follow that

Unfortunately not. .lnk shortcuts are a Windows Explorer concept, and
not one that is the supported by the Windows kernel, hence cmd.exe
sees them as normal files.

> I'm almost certain that I was able to invoke it from a CMD window.

Afaik, gcc and g++ changed into links only recently, to help with the
transition from gcc-3.4 to 4.3.

> I'm sure that I can come up with a hack that will let me do what I want

The easiest thing to do would be to overwrite the link with the file
it points to, e.g. 'cp /bin/g++-4.exe /bin/g++.exe'. You'd have to
remember to do that after every gcc update though.


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list