side effects after installing gcc-18.104.22.1689
Larry Hall (Cygwin)
Wed Oct 27 00:15:00 GMT 2010
On 10/19/2010 11:47 AM, Afflictedd2 wrote:
> Akakima wrote:
>> After updating gcc in my cygwin installation, i discovered
>> that i cannot run gcc.exe from the native winxp console (cmd.exe).
>> gcc.exe has been replaced by gcc-3.exe.
>> Of course, this works fine under bash and ash, but it does not work
>> under cmd.exe.
>> since i prefer to work under cmd.exe. i tried to fix this problem by:
>> adding .LNK to PATHEXT
>> and adding /usr/bin/alternatives to the PATH
>> and now if i type "gcc", cmd finds gcc-3.exe and launch it.
>> But, this is not perfect. gcc (or someone else) wait until i press
>> enter to continue.
>> Anybody knows a better solution ?
> I've got a simple solution that I am not sure if it has been mentioned here.
> take the link g++, and rename it g++.bak
> and make a copy of the g++ you want to use g++-3 or 4
> and rename it g++
> No more access denied problem.
Better solutions than what you found are:
o Invoke g++-3, gcc-3, g++-4, or gcc-4 directly. These are executables
and work fine from the command prompt.
o Create g++.bat and gcc.bat that call your preferred executable.
These are better options than the one you found because they protect the
integrity and structure of the package. Upgrades will not have leftover
".bak" files from earlier versions and so on. Also, your approach interferes
with the use of 'alternatives' to select the compiler version you want. This
is made convenient by 2 scripts, set-gcc-default-3.sh and set-gcc-default-4.sh.
This mechanism is the reason that gcc, g++, gcj, and gnat are symbolic links
now rather than executables.
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin