From: Warren on 27 Apr 2010 09:21 Alex R. Mosteo expounded in news:hr61ms$fsh$2(a)news.eternal-september.org: > Warren wrote: > >> Stephen Leake expounded in news:82fx2lm74h.fsf(a)stephe-leake.org: >> >>> Warren <ve3wwg(a)gmail.com> writes: >>> >>>> Vadim Godunko expounded in >>>> news:5867de55-7ca2-4c64-a72f-d2343153eef0 >>>> @k36g2000yqn.googlegroups.com: >>>> >>>>> On Apr 23, 5:44 pm, Warren <ve3...(a)gmail.com> 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. >> >> Ok, but how is that connected with "-shared"? > > Stab in the dark here; I've read in the past when looking for fully > statically linked programs that shared runtimes are/were needed for > c++ exception mechanisms to work; or at least to keep all corner cases > covered. > > So I wouldn't be surprised if -shared did indeed affect some exception > related stuff. > > What I read was something similar to this, but it was a long time ago: > > http://www.trilithium.com/johan/2005/06/static-libstdc/ I'll have to read that more closely when I have some time, but you've convinced me. I'd really like to eliminate any C++ dependence, since that continues to change with the wind. Thanks, Warren
First
|
Prev
|
Pages: 1 2 3 Prev: InformationWeek Gives Ada Black Eye Next: Error when running gcc from GPS |