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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,28202776a316f7c4 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!e25g2000prg.googlegroups.com!not-for-mail From: Vadim Godunko Newsgroups: comp.lang.ada Subject: Re: GNAT Project Manager and DLLs Date: Thu, 21 Feb 2008 14:05:40 -0800 (PST) Organization: http://groups.google.com Message-ID: <2ef5c690-cfd4-401e-b18b-da4c6d76b3f2@e25g2000prg.googlegroups.com> References: <4b75fe65-d168-4880-9d51-2ee095faa023@f47g2000hsd.googlegroups.com> <3c27a3f9-97b1-4d00-9286-7c75602663ae@k2g2000hse.googlegroups.com> NNTP-Posting-Host: 83.221.195.123 Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1203631541 18711 127.0.0.1 (21 Feb 2008 22:05:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Feb 2008 22:05:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e25g2000prg.googlegroups.com; posting-host=83.221.195.123; posting-account=niG3UgoAAAD7iQ3takWjEn_gw6D9X3ww User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070601 SeaMonkey/1.1.2,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19954 Date: 2008-02-21T14:05:40-08:00 List-Id: On 21 =C6=C5=D7, 21:10, "marcelo.bat...@gmail.com" wrote: > I have another problem now. > > When I unload the DLL created with the GPR file it fails miserably > later on when calling Ada.Text_IO.Put_Line( "some string" ), giving me > this exception: > DLL unloading is not safe for GNAT, especially if you are use automatic initialization. GNAT's binder generate elaboration code for all compilation unit inside DLL and all compilation units from which DLL's units are dependent. You may avoid double elaboration by passing -E to the gnatbind. But I don't known any way to avoid finalization of all dependent units at the DLL unloading phase.