[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hello World output problem
From: |
Paul Pluzhnikov |
Subject: |
Re: Hello World output problem |
Date: |
Sun, 06 Apr 2008 19:13:44 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
noste60 <noste99@yahoo.com> writes:
> I compiled with
> gcc Test_001.c -o Test.exe
> When I execute the Test.exe file it does not give any output.
The problem is that 'test' is a standard UNIX utility, and you
likely didn't execute the 'Test.exe' you've just built, but instead
executed /usr/bin/test (which is part of cygwin).
Name your exe something else, and it will work:
gcc Test_001.c -o Test_001.exe
Alternatively, run your executable explicitly (instead of relying
on your shell and PATH to find it):
./Test.exe
> I am sure I am not the first and only person who encountered this issue
You aren't ...
> I tried to run the exe file in the GDB.
> No errors are sent out and the code results in giving the right output.
That's because 'gdb' uses different rules to figure out what you
want to do: it tries to find executable in the current directory,
and only then looks at your PATH.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.