From: NiGHTS <nights@unku.us>
Subject: Problems with the "mwindows" switch
Date: Fri, 22 May 2015 11:35:58 -0700 (PDT)
Date: 2015-05-22T11:35:58-07:00 [thread overview]
Message-ID: <df2d79a4-b792-49f4-b941-712772dee4e9@googlegroups.com> (raw)
I am trying to compile a GUI Windows application with Ada & Gtk in such a way as to only display the GUI window and not the console window. Early in my development I had success using the "mwindows" linker switch with my GTK window, but had to remove this switch at some point during development after I was no longer able to test run the program without it aborting immediately after startup. I suspect the problem is a conflict with something I've added to the GPR project file.
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 Windows Explorer.
Unfortunately when the "mwindows" flag is set not only does the GUI not appear 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 executable 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 checks
);
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 program *)
);
end Linker;
...
end main;
Any hints on what could be wrong is be highly appreciated!
Thank you.
next reply other threads:[~2015-05-22 18:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 18:35 NiGHTS [this message]
2015-05-22 19:24 ` Problems with the "mwindows" switch sbelmont700
2015-05-22 19:51 ` NiGHTS
2015-05-23 5:33 ` Dmitry A. Kazakov
2015-05-23 7:20 ` NiGHTS
2015-05-23 8:06 ` Dmitry A. Kazakov
2015-05-28 22:19 ` Randy Brukardt
2015-05-28 23:49 ` sbelmont700
2015-05-29 21:24 ` Randy Brukardt
2015-05-29 21:36 ` Jeffrey R. Carter
2015-05-29 22:10 ` Simon Wright
2015-05-30 0:08 ` Dennis Lee Bieber
2015-06-01 21:24 ` Randy Brukardt
2015-06-01 23:12 ` sbelmont700
2015-05-29 11:00 ` Björn Lundin
2015-05-23 20:23 ` gautier_niouzes
2015-06-02 22:33 ` NiGHTS
2015-06-03 6:42 ` Simon Wright
2015-06-03 8:27 ` J-P. Rosen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox