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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a45dbca8d12d7200 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-27 16:44:31 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!skynet.be!skynet.be!louie!tjb!not-for-mail Sender: lbrenta@lbrenta Newsgroups: comp.lang.ada Subject: Re: Binding and linking non-withed packages into an executable References: From: Ludovic Brenta User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Date: 28 Jan 2004 01:44:27 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 80.201.174.129 X-Trace: 1075250670 reader0.news.skynet.be 310 80.201.174.129:57956 X-Complaints-To: usenet-abuse@skynet.be Xref: archiver1.google.com comp.lang.ada:4962 Date: 2004-01-28T01:44:27+01:00 List-Id: Stephen Leake writes: > "Marc A. Criley" writes: > > > Obviously I can have a "configuration package" that with's the > > "peripheral" packages and is withed by the main, but I'd like to > > make the inclusion of such packages a build, rather than compile, > > issue. This way new callback packages can be brought in or omitted > > as needed (the actual app is of course more sophisticated than the > > above toy), so no actual software would have to change. > > I define "actual software" as "anything in CVS". In your desired > system, the Makefile would have to change. In standard Ada, one .adb > file would have to change. Either way, it's one file in CVS. > > What is the actual gain over doing it in a non-standard way? Allowing customers to provide their own callbacks, without recompiling the app or having access to the source code? Like in a plug-in system? How about compiling the plug-ins separately from the application? Then the application reads some sort of configuration file, or directory, or registry of plug-ins, and dlopen()s the appropriate library at run time. I understand there exists an Ada binding to dlopen() already. Would this solve your problem? -- Ludovic Brenta.