user220789
user220789

Reputation: 29

No exe file being generated in c using cygwin

I am useing cygwin for writing programs in c. However, today when I tried to compile a program in using the command

  gcc filename.c

I found out no .exe files were being generated. What may have caused this problem?

Upvotes: 0

Views: 407

Answers (2)

takoyaki
takoyaki

Reputation: 11

I solved this with the following information.

cygwin g++ produces no output

cygcheck -s

I ran the above command and got the following warning:

Warning: There are multiple cygwin1.dlls on your path

I found the old cygwin1.dll in the following path:
C:\Windows\System\cygwin1.dll

I deleted the old cygwin1.dll, then exe file became to generate!

Upvotes: 1

Some programmer dude
Some programmer dude

Reputation: 409196

Without a special argument, the generated executable file is called a.out.exe (I guess on a Windows system, possibly aout.exe, something like that anyway).

To make gcc generate an executable with a specific name you have to use the -o option:

$ gcc filename.c -o filename.exe

Upvotes: 0

Related Questions