This is the mail archive of the
mailing list for the Cygwin project.
Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Wouter van Doorn <wouter at vandoorn dot tv>, cygwin at cygwin dot com
- Date: Fri, 23 Jun 2017 03:49:02 +0300
- Subject: Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp2p.mail.yandex.net; dkim=pass firstname.lastname@example.org
- References: <CANZ2p_ckjzWEp0uPoJ8MAXh=0B6ZhWQVt9v_NmsFP-fpoX-sEg@mail.gmail.com> <email@example.com> <CANZ2p_cpjbjvZfOgSKAmsCT92QHC1i-yPc2BosJgL6u4LCdypQ@mail.gmail.com> <firstname.lastname@example.org> <CANZ2p_dgYfAemU55ssSUkJdnX4ALEAFcWtw+h9R_vM4Z-VYzaw@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
Greetings, Wouter van Doorn!
> On 22 June 2017 at 15:08, René Berber wrote:
>> On 6/22/2017 8:13 AM, Wouter van Doorn wrote:
>>> STOP PRESS: in gdb, the output IS there:
>>> User-PC-> gdb hello.exe
>>> GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
>>> Reading symbols from hello.exe...done.
>>> (gdb) run
>>> Starting program: /home/User/c_dir/hello.exe
>>> [New Thread 6868.0x5b0]
>>> [New Thread 6868.0x18dc]
>>> [New Thread 6868.0x1990]
>>> Hello, world!
>>> [Thread 6868.0x1990 exited with code 0]
>>> [Inferior 1 (process 6868) exited normally]
>>> Which is dandy, but then why, outside of gdb, is there nothing at all?
>> What is "outside"?
>> Are you running this from mintty (recommended) or the Cygwin.bat cmd window?
>> Which shell? (i.e. echo $SHELL)
> With 'outside', I meant a normal run not involving gdb at all. Sorry
> if I was unclear.
> Yes, it's minty, and it's /bin/bash.
> Out of desperation, I have added a sleep for two seconds both before
> and after the printf statement. The sleep does not happen either! The
> prompt is immediately back, so it's more than just 'no output', it
> seems my code never even gets started. Does this shed any new light?
Did you try to rebase your program?
And did you try to not top-post in this list? Thank you in advance.
With best regards,
Friday, June 23, 2017 03:48:14
Sorry for my terrible english...