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]

gcc produces foo.exe, not foo


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".


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