CYGWIN executable crash ??

Ok I feel kind of stupid asking since it's been a while since I used an UNIX system but here goes. I recently installed the full CYGWIN on my Windows 7 machine. Seem like a nice package. So to test it out I did the basic hello world deal. It compiles just fine. But when I run it it crashed :(. So I ran it in gdb and got an error code of 012. Can't find what that means. I need to be able to run programs for a network class I'm taking.

my compile string is the basic:

gcc hello.c -o hello.exe
then I:

run hello.exe

crash :frowning:

Any thoughts ???

Without seeing the code I can't possibly say why it crashed. Though you might try ./hello.exe instead of run hello.exe in case you meant that literally.

Just your basic hello word code.

#include <stdio.h>

main()
{
printf("Hello, world\n");
}

Nothing fancy. I need to check my PATH. The dir where the code resides may not be there. Could be an issue. Just wich I could find what the gdb exit code of 012 is ... I'll also try your suggestions.

PATH being wrong would mean it doesn't work, not that it crashes.

That can't possibly be your code by the way, since you've forgotten to specify main's return value and such. Post your actual, unmodified code, word for word, letter for letter, keystroke for keystroke.

Actually that is my code. It's the same hello world I've used for years straight out of my Kernighan/Ritchie book ...

---------- Post updated at 11:57 AM ---------- Previous update was at 11:00 AM ----------

Added a return 0 and it doesn't crash. Been many years since I ran this. Never had to have a return value on it. Thanks for the tip.