This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc produces foo.exe, not foo


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
> "gnu-win32-request@cygnus.com" with one line of text: "help".

-- 
Jeff Sturm
jsturm@sigma6.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]