From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Thu, 10 Sep 2009 16:02:50 -0500 Message-ID: Date: Thu, 10 Sep 2009 21:24:08 +0100 From: Jack Mitchell Newsgroups: comp.lang.ada Subject: Re: How can I loose the cmd window from my GtkAda app? References: MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1;format=flowed Content-Transfer-Encoding: 8bit User-Agent: Turnpike/6.06-U () X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-sLKAH78JGcVUKnvfT1lgM/LI8OGtW91hfCBw7bS6fG4MqnH4oAclSUV7B05/lKAenJd51nOyIi4t2OD!ypRhZLU1+uWgIc29H7AdUQUok/HsIb1A360ZxW3lDP+foGTVB8/T6TupQo/Ox1CHOrRNocM= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Xref: g2news2.google.com comp.lang.ada:8275 Date: 2009-09-10T21:24:08+01:00 List-Id: 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 , Dmitry A. Kazakov 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