comp.lang.ada
 help / color / mirror / Atom feed
From: Warren <ve3wwg@gmail.com>
Subject: Using gnat & ncurses
Date: Mon, 15 Mar 2010 20:59:39 +0000 (UTC)
Date: 2010-03-15T20:59:39+00:00	[thread overview]
Message-ID: <Xns9D3CACDFB7F84WarrensBlatherings@188.40.43.245> (raw)

On the weekend I stumbled across a rather annoying
surprise. The culprit was the implementation of 
ncurses lib. I've only ever [recently] used it in
C and always assumed it was a C-only library. I
am aware that there is also a ncurses C++ interface 
as well, but I thought that was isolated. Well, maybe
not.

It turns out that if I use an Ada main program and
link with ncurses,  Ada exceptions fail (under
Cygwin) with an abort (Access violation IIRC). You
don't actually have to invoke any ncurses routines,
but simply reference something to cause it to link
in.

After some experimentation, I discovered that I could 
overcome the problem by making the main program
a C++ program and invoking the usual adainit/adafinal
routines. Annoying, but at least it is no longer
a "show stopper" that it initially appeared to be.

It just occurred to me that there was some sort 
of Ada binding in ncurses IIRC. Has anyone here 
had any experience with it?  Maybe that would
circumvent this main program annoyance among other
things.

Warren



             reply	other threads:[~2010-03-15 20:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 20:59 Warren [this message]
2010-03-16 18:03 ` Using gnat & ncurses Dirk Heinrichs
2010-03-16 18:35   ` Ludovic Brenta
2010-03-16 19:45     ` Warren
2010-03-18 13:45 ` Nomen Nescio
2010-03-18 16:38   ` Warren
replies disabled

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