delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/02/10:14:33

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: "Akakima" <akakima33 AT gmail DOT com>
Subject: Re: side effects after installing gcc-3.4.4.999
Date: Mon, 2 Mar 2009 10:13:44 -0500
Lines: 109
Message-ID: <gogt3h$56g$1@ger.gmane.org>
References: <gofr4i$s1t$1 AT ger DOT gmane DOT org> <49AB8757 DOT 90807 AT gmail DOT com>
Reply-To: "Akakima" <akakima33 AT gmail DOT com>
Mime-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

"Dave Korn" wrote:

>
>  Nope, of course not.  Use "gcc-3.exe" instead.

Dave, English is not my native language (I guess you know that!)
So i want to add that i am not critisizing
but just stating what i want and what i found. :-)

Why "of course" ?. You said in a previous post that the update would 
go
without change in behaviour. I do not want to use gcc-3.exe.
I have many .bat/.cmd files calling gcc and i do not want to modify 
them.
I still want to be able to call gcc.


>> and now if i type "gcc", cmd finds gcc-3.exe and launch it.
>  That didn't work when I tried it:
>
> C:\cygwin\etc\alternatives>gcc
> Access is denied.

Sorry, i dont know why. I assure you it works on my computer.
The are many entries in the WIndows registry to support shortcuts.
May be one of these entries is not ok on your machine.

>
> C:\cygwin\etc\alternatives>gcc.lnk
> Access is denied.
>
> C:\cygwin\etc\alternatives>
>
>> But, this is not perfect. gcc (or someone else) wait until i press
>> enter to continue.
>
>  GCC doesn't do that sort of thing.  What actual command do you 
> type, and
> what symptom do you get?  What program is running if you check with 
> "ps -a" in
> another window while this possible wait-to-press-enter is occurring? 
> Does GCC
> go ahead and generate a compiled output after you press enter?

the two commands:
  gcc
  gcc --version
ask for an enter.

The command: gcc file.c
does generate a.exe without asking for an enter.
I dont know why but will do some more checks.

>
>  The problem arises because you insist on two things: 1) you want to 
> use
> cmd.exe, 2) you want to start a program without typing the name it's 
> actually
> called.  Since cmd.exe doesn't understand links, your two 
> requirements are
> mutually contradictory.  The best solution is to downgrade, or to 
> copy
> gcc-3.exe to gcc.exe and get rid of the link stuff altogether.
>

Yes i want to use cmd.exe. This is ok i think.
And i want to type gcc not ggc-3. (lots of .bat files with gcc.exe 
refs)

cmd.exe does understand links. I just reinstalled the update.
Now, if i type (under cmd.exe):

  E:\cygwin>E:\cygwin\etc\alternatives\gcc.lnk
  E:\cygwin>gcc-3: no input files
    <--- waiting for an enter here. Enter does gives me the next line.
  E:\cygwin>

Compiling works without asking for an enter:

  E:\cygwin>type a.c
  int main( ){return 0;}
  E:\cygwin>E:\cygwin\etc\alternatives\gcc.lnk a.c
  E:\cygwin>dir a*
  2009-03-02  09:08                22 a.c
  2008-08-30  18:03             8 904 a.exe
  E:\cygwin>

Adding .LNK to PATHEXT and e:\cygwin\etc\alternatives to PATH
allow me to type "gcc" from any directory. Windows will try
gcc.bat, gcc.cmd, gcc.exe, gcc.lnk in all the directories in the PATH.

Now, i am not saying this is a bug in cygwin. Again, i just want to 
make someone
aware of the fact this is not without change in behaviour.

After i updated my installation with setup.exe (ran it without 
selecting
anything and got the new gcc's automatically), i was surprise to
see that gcc.exe was not working anymore.

For the moment, i undone the update. Later i will find something else.
(Like copy gcc-3.exe gcc.exe).

And if i want to use both gcc3 and gcc4, i will probably use a couples
of bat files that will switch things around.

Thanks for your attention.




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019