Web lists-archives.com

Re: Problems with "Hello, World!"




On 3/19/2019 2:31 PM, Vesa P. wrote:
>
> Compiling my Hello World application didn't complain but when running
> it I didn't get any output. My compilation command was like this:
>    gcc -Wextra -Wall -o hello hello.c
> And my source code is below between "---" markers:
> ----------------------------------
> #include <stdio.h>
>
> int main() {
>   printf("Hello, World!\n");
>   return 0;
> }
> ----------------------------------
>   
----
    Well that is weird.  I just tried it on my Win7 and it works
as expected. 

    What directory are you running it in?  Could permissions be involved?

    Also what window are you running in?  I doubt it should be the case, but
some windows programs won't generate output in a cygwin shell or a
cygwin tty,
but will in cmd.e

    Have you tried running with 'strace' to see what calls it executes?:

strace -f ./hello

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple