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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.115.2 with SMTP id o2mr8115298ywc.55.1470944554887; Thu, 11 Aug 2016 12:42:34 -0700 (PDT) X-Received: by 10.157.2.39 with SMTP id 36mr196025otb.3.1470944554852; Thu, 11 Aug 2016 12:42:34 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!c52no8273962qte.1!news-out.google.com!d130ni32091ith.0!nntp.google.com!f6no9227766ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 11 Aug 2016 12:42:34 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=142.113.145.205; posting-account=gOYTTAoAAADrNEg_oe5Etelo-0qd7UeW NNTP-Posting-Host: 142.113.145.205 References: <90233803-e8cb-4461-a093-f705409dc83f@googlegroups.com> <70efd651-f3ef-4578-b0e5-33ccfea0a901@googlegroups.com> <1470910315.15815.15.camel@obry.net> <2dfac232-a683-40f4-aff4-6d15b57b525c@googlegroups.com> <1470922817.15815.23.camel@obry.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <71d7c4c9-1d6a-4232-aba5-32639c7d2250@googlegroups.com> Subject: Re: GNAT, portability between computers (win32) From: Aurele Injection-Date: Thu, 11 Aug 2016 19:42:34 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:31403 Date: 2016-08-11T12:42:34-07:00 List-Id: > Don't rush. It might freeze upon loading. If it does, which is most > likely the case when the library does anything beyond trivial > computations. Then > > 1. add for Library_Auto_Init use "false"; > > 2. make sure that gnatbind is invoked without -a switch > > 3. call init before first use of the library. E.g. if the > library name is foo then > > procedure Init_My_Library; > pragma Import ("C", Init_My_Library, "fooinit"); Some more info on how I finally got the DLL working. 1. I used: for Library_Standalone use "encapsulated"; 2. I used: Library_Auto_Init use "true"; 3. Must NOT use the "-shared" binder switch on either the DLL or the calling application. Using the -shared switch cause the DLL/app to freeze. Thanks for your input Dmitry o7 Aurele