On Mon, Apr 9, 2012 at 9:16 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
On 2012-04-09, at 9:44 AM, REPLeffect wrote:
So I'm wondering -- has Gambit ever been tested to work without the console window? I know you can hide it when calling the process-related procedures, but I couldn't find anything in the documentation or on the mailing list about the main app not having a console.
It is clearly possible, for example the Jedi IDE for JazzScheme is a window application written with Gambit. Perhaps looking at the Jedi sources will give you some ideas.
Also, here's an old message to the Gambit ML which seems related :
https://mercure.iro.umontreal.ca/pipermail/gambit-list/2011-March/004939.htm...
Finally, I sent a private message on this subject which I should have CC'd to the Gambit ML. It is copied below.
Let me know if you need more assistance.
Marc
[snip]
Thank you, Marc. That was very helpful. Turns out, I was not defining ___LIBRARY while compiling one of my scheme modules, nor when compiling at least one of the link files I was generating.
After adding the ___LIBRARY define, the application ran fine when compiled as a non-console windows app. I even checked the portable executable header of the executable to confirm that it was using the "windows" subsystem (as opposed to "console") -- which it was.
The only thing that puzzled me, was that I was still getting a terminal window popping up with my debug messages printed to standard output. On a hunch, I ran the executable and piped stdout to an output file. When I did this, no console window popped up, and the application ran as expected.
So my question is this -- If a Windows app with Gambit embedded does not have a console, does the runtime open a new one (using CreateProcesss, I'm assuming) in order to display data sent to stdout? And if so, are there any setup parameters I can change to prevent this? Ideally I'd like to be able to turn this on and off at will, or at least be able to chose one way or another at startup. For debugging purposes, it is handy to have the console, but for my users I'd want to shut it off.
Thanks again for the help.