comp.lang.ada
 help / color / mirror / Atom feed
* How link Windows GUI with GNAT
@ 2001-05-31 13:48 Alfred Hilscher
  2001-05-31 14:30 ` Ted Dennison
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alfred Hilscher @ 2001-05-31 13:48 UTC (permalink / raw)


Hi,

a short question:

I've written a GUI app on WinNT. When I start it, it always opens a
console window first (although the GUI is show afterwards). From Aonix I
know, that I can direct the linker to produce a "console app" or a
"window app". How is it done with GNAT ? I didn't find a
correspondending linker-switch.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How link Windows GUI with GNAT
  2001-05-31 13:48 How link Windows GUI with GNAT Alfred Hilscher
@ 2001-05-31 14:30 ` Ted Dennison
  2001-05-31 14:58   ` John English
  2001-05-31 14:41 ` Ed Falis
  2001-06-01  6:54 ` Alfred Hilscher
  2 siblings, 1 reply; 6+ messages in thread
From: Ted Dennison @ 2001-05-31 14:30 UTC (permalink / raw)


In article <3B164B9C.2355F6E3@icn.siemens.de>, Alfred Hilscher says...
>
>I've written a GUI app on WinNT. When I start it, it always opens a
>console window first (although the GUI is show afterwards). From Aonix I
>know, that I can direct the linker to produce a "console app" or a
>"window app". How is it done with GNAT ? I didn't find a
>correspondending linker-switch.

I haven't tried this myself, but there's a cygwin gcc switch "-mwindows" that is
supposed to do this for you.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How link Windows GUI with GNAT
  2001-05-31 13:48 How link Windows GUI with GNAT Alfred Hilscher
  2001-05-31 14:30 ` Ted Dennison
@ 2001-05-31 14:41 ` Ed Falis
  2001-06-01  6:54 ` Alfred Hilscher
  2 siblings, 0 replies; 6+ messages in thread
From: Ed Falis @ 2001-05-31 14:41 UTC (permalink / raw)


Alfred Hilscher wrote:
>How is it done with GNAT ? I didn't find a
> correspondending linker-switch.

-mwindows

- Ed



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How link Windows GUI with GNAT
  2001-05-31 14:30 ` Ted Dennison
@ 2001-05-31 14:58   ` John English
  2001-06-04  3:56     ` Warren W. Gay VE3WWG
  0 siblings, 1 reply; 6+ messages in thread
From: John English @ 2001-05-31 14:58 UTC (permalink / raw)


Ted Dennison wrote:
> 
> In article <3B164B9C.2355F6E3@icn.siemens.de>, Alfred Hilscher says...
> >
> >I've written a GUI app on WinNT. When I start it, it always opens a
> >console window first (although the GUI is show afterwards). From Aonix I
> >know, that I can direct the linker to produce a "console app" or a
> >"window app". How is it done with GNAT ? I didn't find a
> >correspondending linker-switch.
> 
> I haven't tried this myself, but there's a cygwin gcc switch "-mwindows" that is
> supposed to do this for you.

It's actually a linker switch: "gnatmake foo.adb -largs -mwindows"
will do the trick.

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.comp.it.bton.ac.uk/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How link Windows GUI with GNAT
  2001-05-31 13:48 How link Windows GUI with GNAT Alfred Hilscher
  2001-05-31 14:30 ` Ted Dennison
  2001-05-31 14:41 ` Ed Falis
@ 2001-06-01  6:54 ` Alfred Hilscher
  2 siblings, 0 replies; 6+ messages in thread
From: Alfred Hilscher @ 2001-06-01  6:54 UTC (permalink / raw)


Many thanks to all of you.

Alfred Hilscher wrote:
> "window app". How is it done with GNAT ? I didn't find a
> correspondending linker-switch.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How link Windows GUI with GNAT
  2001-05-31 14:58   ` John English
@ 2001-06-04  3:56     ` Warren W. Gay VE3WWG
  0 siblings, 0 replies; 6+ messages in thread
From: Warren W. Gay VE3WWG @ 2001-06-04  3:56 UTC (permalink / raw)


John English wrote:
> Ted Dennison wrote:
> > In article <3B164B9C.2355F6E3@icn.siemens.de>, Alfred Hilscher says...
> > >I've written a GUI app on WinNT. When I start it, it always opens a
> > >console window first (although the GUI is show afterwards). From Aonix I
> > >know, that I can direct the linker to produce a "console app" or a
> > >"window app". How is it done with GNAT ? I didn't find a
> > >correspondending linker-switch.
> >
> > I haven't tried this myself, but there's a cygwin gcc switch "-mwindows" that is
> > supposed to do this for you.
> 
> It's actually a linker switch: "gnatmake foo.adb -largs -mwindows"
> will do the trick.

Yes, note the emphasis on "linker switch". If you omit -largs, the compile
and link will silently ignore the -mwindows option (if my memory serves).

FYI, note that if you have any Put_Line() etc. calls to the console window,
either from debug code or by design, with the -mwindows option used, your
application will exit (I observed the application returning status code 3
when this happens).  So you'll want to disable those, if they are present ;-)

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-06-04  3:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-31 13:48 How link Windows GUI with GNAT Alfred Hilscher
2001-05-31 14:30 ` Ted Dennison
2001-05-31 14:58   ` John English
2001-06-04  3:56     ` Warren W. Gay VE3WWG
2001-05-31 14:41 ` Ed Falis
2001-06-01  6:54 ` Alfred Hilscher

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