comp.lang.ada
 help / color / mirror / Atom feed
From: Jack Mitchell <jack@plus.com>
Subject: Re: How can I loose the cmd window from my GtkAda app?
Date: Thu, 10 Sep 2009 21:24:08 +0100
Date: 2009-09-10T21:24:08+01:00	[thread overview]
Message-ID: <VBVxlZCoBWqKFwAQ@plus.com> (raw)
In-Reply-To: w9hl8hae9g57$.ry62m3ommmaw.dlg@40tude.net

As something of a newby, I added the -nwindows option only on the 
production builds (I have a debug package which writes to file and to 
the console if stdout is open)

E.G.

    package Linker is
       ...........
       case Mode is
          when "Debug" =>

          when "Production" =>
             for Default_Switches ("ada") use Linker'Default_Switches 
("-mwindows");
       end case;
    end Linker;





In message <w9hl8hae9g57$.ry62m3ommmaw.dlg@40tude.net>, Dmitry A. 
Kazakov <mailbox@dmitry-kazakov.de> writes
>On Tue, 12 May 2009 10:13:04 +0200, Jean-Pierre Rosen wrote:
>
>> Dmitry A. Kazakov a �crit :
>>> Yes, however I would prefer to have it enforced by gtkada.gpr, rather than
>>> contaminating the application's gpr which with-es gtkada.gpr. Unfortunately
>>> I know no way to do this in a library project.
>>>
>> I don't think it would be a good idea, because sometimes you do want
>> that window (to get simple traces with Text_IO for example). And (AFAIK)
>> there is no option to cancel a -mwindows option.
>
>Using standard output is kind of "erroneous" in gtkada applications. Under
>Windows it will most likely crash the application (due to Use_Error, I
>guess).
>
>For tracing I am using a GTK window, which is much simpler than text
>tracing. It also allows to stop the application at the tracing point, catch
>GTK/Glib errors with stack backtracing etc.
>
>BTW, when running under GPS, output to the standard output works even with
>-mwindows.
>
>But the point was that -mwindows is just one example of what a library
>project could like to pass to the clients.
>

-- 
Jack Mitchell



      reply	other threads:[~2009-09-10 20:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 15:19 How can I loose the cmd window from my GtkAda app? daniel.wengelin
2009-05-11 15:53 ` Dmitry A. Kazakov
2009-05-11 15:30   ` Per Sandberg
2009-05-11 16:40     ` Dmitry A. Kazakov
2009-05-11 16:41       ` Per Sandberg
2009-05-11 21:36       ` sjw
2009-05-12  7:15         ` Dmitry A. Kazakov
2009-05-12  8:13       ` Jean-Pierre Rosen
2009-05-12  9:24         ` Dmitry A. Kazakov
2009-09-10 20:24           ` Jack Mitchell [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox