Subject: Re: gcc produces foo.exe, not foo
From: [email-masked] (Jeff Sturm)

24 Sep 1998 03:51:52 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Arne Glenstrup <[email-masked]>
Cc: [email-masked]

This is a constant nuisance for porting packages to gnu-win32.  The
install program breaks, as do many other utilities when they hit an
executable file with a .exe suffix.

I know the problem can be "fixed" to some degree by modifying all the
appropriate tools to append the .exe suffix transparently whenever
needed.  Apparently this has been partially done, e.g. when I try a 'mv'
command:

  bash$ mv foo.exe foo
  mv: `x.exe' and `x' are the same file

However I run NT, which understands executables without any .exe suffix
just fine.  For my use I would rather be able to disable the .exe
generation in gcc and go without it for all programs except bash and a
few others I might launch from ordinary win32 programs.

Arne Glenstrup wrote:
> 
> Hello,
> 
> Apologies if this question has been answered many times before, but I
> didn't seem to be able to find it in the mailing list archives via the
> search function.
> 
> The problem is that it seems that when running
> 
>   gcc -o foo foo.c
> 
> it produces not a file named foo, but a file named foo.exe. This has
> caused me problems when writing a Makefile somewhat like
> 
>   bar: foo.c
>           gcc -o foo foo.c
>           mv foo bar
> 
> because it complains when trying to mv file foo.
> 
> What is the standard way of circumventing this problem? Simply writing
> 
>           mv foo.exe bar.exe
> 
> is not a full solution, because that is not portable. Is it necessary to
> write some autoconf stuff to check what the extension of the executable
> resulting from calling gcc is?
> 
> Thanx,
> 
> -- Arne.
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "[email-masked]" with one line of text: "help".

-- 
Jeff Sturm
[email-masked]
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".