This is the mail archive of the cygwin-apps@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]
Other format: [Raw text]

Re: [patch] Help Option


Max Bowsher wrote:
Earnie Boyd <earnie_boyd@yahoo.com> wrote:


That depends on how it's coded.  The -mwindows switch alone doesn't
cause the abscense of stdio.

<foo.c>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>

int WINAPI WinMain (
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR     lpszCmdParm,
    int       nCmdShow
)
{
    printf("stdout\n");
    fprintf(stderr, "stderr\n");
}
</foo.c>
<build>
g++ -o foo foo.C -mwindows
</build>

I couldn't get your foo.c to produce any output in a cmd shell. (It does in
a Cygwin shell)

Now, that's strange, try this on for size:

foo 2> err > out
type out
type err

So, now the question is, where is the console buffer? Perhaps WriteConsole will help?

Earnie.


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