This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: No output on stdout


>>>>> "Clemens" == Quoss, Clemens <Clemens.Quoss@Dresdner-Bank.com> writes:

    Clemens> Hello, when I compile a very simple C program like the
    Clemens> one below with gcc under Cygwin and then run it in bash,
    Clemens> I don't get an output on the console window.

    Clemens> When I run the same executable under a DOS Shell in
    Clemens> Windows NT or 98, I get the 'Hello, Cygwin!' line.

    Clemens> Is there anything I overlooked on setup (I did set CYGWIN
    Clemens> to 'tty notitle glob' like mentioned in the User's
    Clemens> guide)?  Anything else that prevents the stdout to be
    Clemens> shown on console?

Hmm, you didn't by any chance call the program 'test'?  If so, you may
be running the bash shell built-in command 'test':

    $ type test
    test is a shell builtin

If that's the case, it would make sense that only the DOS command
window would run it, since COMMAND.COM doesn't have any built-in
command called 'test', and so it would next look for files named
test.com, test.exe, etc. in order to execute the command.

Try the following in a bash shell to see if your test program works:

    $ gcc -o mytest mytest.c
    $ ./mytest
    Hello, Cyqwin!
    $

-- 
Dario Alcocer -- Sr. Software Developer, Helix Digital Inc.
alcocer@helixdigital.com -- http://www.helixdigital.com

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]