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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.7.133 with SMTP id 5mr11672793yhp.3.1432319758485; Fri, 22 May 2015 11:35:58 -0700 (PDT) X-Received: by 10.140.80.168 with SMTP id c37mr147693qgd.39.1432319758446; Fri, 22 May 2015 11:35:58 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!z60no3257395qgd.1!news-out.google.com!4ni17qgh.1!nntp.google.com!z60no3257393qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 22 May 2015 11:35:58 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=73.138.95.40; posting-account=wEPvUgoAAABrLeiz_LRhQ3jeEhyfWVMH NNTP-Posting-Host: 73.138.95.40 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Problems with the "mwindows" switch From: NiGHTS Injection-Date: Fri, 22 May 2015 18:35:58 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:25960 Date: 2015-05-22T11:35:58-07:00 List-Id: I am trying to compile a GUI Windows application with Ada & Gtk in such a w= ay as to only display the GUI window and not the console window. Early in m= y development I had success using the "mwindows" linker switch with my GTK = window, but had to remove this switch at some point during development afte= r I was no longer able to test run the program without it aborting immediat= ely after startup. I suspect the problem is a conflict with something I've = added to the GPR project file.=20 In my program, the very first command it ever does is this: Ada.Text_IO.Put_Line ("Hello World"); My expectation is that I would only see this "Hello World" message if I ran= the executable from a console window but not when run directly from Window= s Explorer. Unfortunately when the "mwindows" flag is set not only does the GUI not app= ear as expected, but I don't get any feedback on the command console either= . It makes me think that there is something fundamentally broken with the e= xecutable itself. Here is a limited view of my GPR project file: with "gtkada"; with "gnatcoll_sqlite"; project main is ... package Builder is for Default_Switches ("ada") use ( "-g" -- Compile with Symbols for Debugging ); end Builder; package Compiler is for Default_Switches ("ada") use ( "-g", -- Compile with Symbols for Debugging "-gnat05", -- Use Ada 2005 "-gnata" -- Compile all Assertions and enable all runtime c= hecks ); end Compiler; package Linker is for Default_Switches ("ada") use ( "-g", -- Compile with Symbols for Debugging "-pthread", -- Link with pthread support "-lusb_driver", -- Driver imported from C "-mwindows" -- Launch Window, not console (* breaks progra= m *) ); end Linker; ... end main; Any hints on what could be wrong is be highly appreciated! Thank you.