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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2547bf2cbea1050f X-Google-Attributes: gid103376,public From: John Howard Subject: Re: Dynamic linking using Gnat Ada Date: 1996/09/05 Message-ID: #1/1 X-Deja-AN: 178725708 references: to: Martin Lorentzon content-type: TEXT/PLAIN; charset=US-ASCII organization: SkyNET Corporation mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-09-05T00:00:00+00:00 List-Id: On 5 Sep 1996, Martin Lorentzon wrote: > I'd like to dynamically link an Ada program using Gnat Ada. > Is it possible? Any hints on how to? There is the Ada 95 route and then there are other ways. The Ada 95 route is a "distributed program" where a system may have: 1) a main subprogram on one processor using data store elsewhere; or 2) many cooperating main subprograms running on the same or different processors. You would use a compiler that supports the Distributed Systems annex in order to interface with some underlying communication subsystem. The communication subsystem might be provided by an operating system or another software product. GNAT (v3.05) currently does not utilize a particular communication subsystem and also none is provided. According to the GNAT v3.05 Features text file: "ANNEX E. DISTRIBUTED SYSTEMS (fully implemented) (this refers to the compiler part, stub generation and the pragmas)" An Ada 95 for OS/2, DOS, or Windows that provides a communication subsystem packaged within a prevalent dynamic link library (DLL) format would maximize proliferation of support for the Distributed Systems annex. The 32 bit DLL format is supported by several operating systems. A DLL is not dependent upon any particular programming language. Creating a DLL requires a capable compiler and a linker. I have not tried to use GNU tools to create a DLL. Because of familiarity I use non-GNU tools to create DLL's. Several GNAT for OS/2 users create GNAT programs that dynamically link with their custom DLL's. It is possible to ignore the Distributed Systems annex and just use other ways to enable remote procedure calls (such as linking with custom DLL's). But the Distributed Systems annex provides more framework than just remote procedure calls. See package System.RPC for details. -- John Howard -- Team Ada Team OS/2 --