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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,56a94442d514b905 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Plugins/Dynamic Libraries Date: Thu, 11 Nov 2004 14:59:50 +0100 Organization: None Message-ID: <7054078.maftqStDp2@linux1.krischik.com> References: <419313b1$0$31235$9a6e19ea@news.newshosting.com> <1620578.6MPXyIRIlq@linux1.krischik.com> <41934335$0$9740$ba620e4c@news.skynet.be> Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1100183229 04 32331 ttiyXSEJA7WLSifV 041111 14:27:09 X-Complaints-To: usenet-abuse@t-online.de X-ID: b-9U02ZQYeM9yOUNRO0inisLEZzWpH3GekYCOVpfz88ltoLuJmOeo5 User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:6144 Date: 2004-11-11T14:59:50+01:00 List-Id: Adrien Plisson wrote: > Martin Krischik wrote: > >> A current version of GNAT and GPS can do DLLs out of the box. Just Add >> the >> >> for Library_Dir use ...; >> for Library_Name use ...; >> for Library_Kind use ...; >> for Library_Version use ....; > > these are static bindings done at compile time. the resulting executable > contains a segment which tells the system to load the given library and > relocate symbols in the process space. but if the library is not present > at application startup, the application does not start: the system is > responsible for loading and checking the dll. (at least it works this > way under windows). > > Andrew was talking about dynamic bindings at runtime. that is calling a > function which loads the dll, whose name is contained in a variable. if > at application startup the library does not exists, it is not a problem: > the programmer is responsible for loading and checking the dll. > >> to your project file and all needed steps will be done for you. Why there >> is no checkbox in GPS I don't know. For Windows you need the >> "experimental" MinGW GNAT based on GCC 3.4.2. Older GNAT's can do Linux >> DLLs only. > > it seems GNAT 3.15p for windows is doing DLLs (according to the doc, i > had no time to test it). Last time I checked in GNAT 3.15p you had to read 2 pages of documentation and then call dlltool 3 times with all sorts of wacky options while in GCC 3.4.2 you just tell the project manager you want a DLL and then GNAT does it all for you (incl. calling dlltool). With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com