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-Thread: 103376,12c54a0f5a27d882 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Autoconf & gnat Help Needed References: <82sk6nn4vn.fsf@stephe-leake.org> <82ochamzq1.fsf@stephe-leake.org> <5867de55-7ca2-4c64-a72f-d2343153eef0@k36g2000yqn.googlegroups.com> Date: Sat, 24 Apr 2010 07:18:06 -0400 Message-ID: <82fx2lm74h.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.96 (windows-nt) Cancel-Lock: sha1:D4ot+s5WxhfxVB0ejDcbHlSEh0E= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: bf4024bd2d356e197caa713417 Xref: g2news1.google.com comp.lang.ada:10190 Date: 2010-04-24T07:18:06-04:00 List-Id: Warren writes: > Vadim Godunko expounded in news:5867de55-7ca2-4c64-a72f-d2343153eef0 > @k36g2000yqn.googlegroups.com: > >> On Apr 23, 5:44 pm, Warren wrote: >>> >>> For a basic interpreter, making use of ncurses, libgmp, libgsl, >>> and PostgreSQL etc., it is unavoidable. :)  I tried to avoid C++ >>> like the plague, but ncurses requires a C++ main, if GNAT exceptions >>> are to work correctly. I'm not sure of the details why, but a GNAT >>> exception + ncurses and a C or gnat main leads to an abort. >>> Switching to a C++ main program has corrected that. >>> >> Did you try to pass -shared to gnatbind? > > No, but is that really relevant? > > The problem was not library linkage, but the fact that > if an exception was raised in the Ada modules, the > exception handler would not work -- the whole unit > would abort. Lots of things are relevant in exception handling. First is the exception handling mechanism; set-jump/long-jump vs zero cost. GNAT supports both, with zero cost the default; Windows dlls require sj/lj. It may be that using a C++ main also implies the sj/lj mechanism. -- -- Stephe