> What were you talking about? Gcc always reports "gcc: hello.exe: No
> such file or directory" on your first command line.
Rule of thumb for placing -o switch. You need to have source code, so I used
example, "hello.c" and did not include any source. It is a pretty simple, public domain, seven
WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
MessageBox (NULL, "Hello, Windows!", "Hello", MB_OK);
Assumed you knew you had to have source code before you could
compile/build executables and subsequently invoke them.
compile/build it for Mingw with the following:
>gcc -mwindows <sourcefile name> -o <sourcefile name.exe>
$gcc -mno-cygwin <sourcefile name> -o<sourcefile name>.exe
After you've successfully built your app, you can then type the name of the file <sourcefile
name> at the command prompt. Otherwise you will Always get things like what you
mentioned above. If there is not an executable named hello.exe that your system can find,
then your system can't run the executable/program.
For more information, read documentation on using gcc command line (gcc --help)
or take a look at the following websites:
click on "Documentation".