This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 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: xterm is a console program?


Benny,

A simple WinMain that parses GetCommandLine and calls main() would
do the trick, I think.


I think the runtime already does that automatically.  You really only
need to add -mwindows for the link step.


That is correct.


Of course, another issue remains: Even non-console apps (such as xterm) dump error information to the console. These error messages are forever lost and prevented from being seen if we add -mwindows to the link line. This makes me prefer run-time solutions, such as using "run.exe". With that in mind, here is what I have to say about -mwindows, if we ever chose to obliterate error messages.


However, we haven't added this link flag for all executables (which I think is the only granularity we have) because some of the executables in the build tree *do* have console output only.


Case in point:
1) Open a cmd or command prompt

2) cd \cygwin\usr\X11R6\bin

3) startxwin.bat (starts X, sets PATH and DISPLAY)

4) xdpyinfo

Notice that xdpyinfo dumps its into to the cmd or command console. Adding -mwindows to all executables would disconnect xdpyinfo from the console and would not allow it to print its info in a cmd/command window anymore. I am not sure what would happen if you ran it under bash (Cygwin shell) or within an xterm. I have a feeling that it wouldn't output its data under any shell, which would be most unfortunate.


So, we have two choices:


1) Evaluate individual candidates for addding the -mwindows flag to their link command.

2) Check for, or add, a finer granularity of adding link flags to only non-console apps in the build tree.


Thoughts? (Don't forget my comments about error messages at the top)


Harold



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