Re: Really easy cygwin / gcc question



"Default User" <defaultuserbr@xxxxxxxxx> writes:
Michael wrote:

Hi Vladimir,

I just used:
gcc -g test.c -o test.exe

I get no warnings or errors

Thanks for your help.

Don't top-post. Your replies belong following or interspersed with the
quotes.

As one person already mentioned, there is a progam called "test" on
most UNIX systems. Also, if you're running from the CYGWIN shell you
can't leave off the extension when you run it the way you can with
Windows or DOS. That's why progams developed on UNIX systems tend not
to have the .exe extension, as it doesn't mean (or do) anything special.

<WAY_OT>
Cygwin runs under Windows, so executables always have names ending in
".exe". You can omit the extension when you execute the program;
Cygwin does some magic to let you refer to the file as either "foo" or
"foo.exe". If there's a shell script called "foo" and an executable
called "foo.exe", it resolves the ambiguity in some manner that I
can't be bothered to remember.
</WAY_OT>

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Re: File compatibility issues with LAN drive
    ... launch the application registered for that file extension. ... normally not make any difference from the point of view of windows. ... problem because Windows always wants to start them as executables. ... There are some really wild differences between *nix file permissions ...
    (sci.electronics.design)
  • Re: File compatibility issues with LAN drive
    ... launch the application registered for that file extension. ... Windows did not have a file "executable" flag, ... normally not make any difference from the point of view of windows. ... problem because Windows always wants to start them as executables. ...
    (sci.electronics.design)
  • Re: File compatibility issues with LAN drive
    ... the application registered for that file extension. ... Windows did not have a file "executable" flag, ... So samba would default to setting the flag when writing a file ... this could indeed be the problem because Windows always wants to start them as executables. ...
    (sci.electronics.design)
  • Re: Cant run programs/executables from Xemacs
    ... itself is usually empty outside of cygwin (eg. in the windows ... The executables are only once on disc. ... files (it needs to prefix them with the windows path to the cygwin ...
    (comp.emacs.xemacs)
  • Re: Java .class to .exe
    ... Linux-executables from JAVA sources, with gcj, a tool from the Gnu ... As GCC can be used with Windows, look out for the 'cygwin' or 'mingw' - ... it works on Windows as well. ... executables created with gcj will require the runtime dlls be ...
    (comp.lang.java.programmer)