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.182.68.50 with SMTP id s18mr2258355obt.47.1423210474344; Fri, 06 Feb 2015 00:14:34 -0800 (PST) X-Received: by 10.140.94.74 with SMTP id f68mr23125qge.13.1423210474242; Fri, 06 Feb 2015 00:14:34 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!hl2no10512173igb.0!news-out.google.com!q4ni11076qan.0!nntp.google.com!v8no6914419qal.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 6 Feb 2015 00:14:34 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.130.211.21; posting-account=pmkN8QoAAAAtIhXRUfydb0SCISnwaeyg NNTP-Posting-Host: 86.130.211.21 References: <0f33e6b4-d423-4539-ae62-680f3b72afc0@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ? From: Austin Obyrne Injection-Date: Fri, 06 Feb 2015 08:14:34 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:24906 Date: 2015-02-06T00:14:34-08:00 List-Id: On Thursday, February 5, 2015 at 11:33:39 PM UTC, Simon Wright wrote: > Austin Obyrne writes: > > > 1)Would some reader confirm that this true or false and explain the > > mechanics of how it is done. > > The Ada compiler translates the source code into object code, which is > linked against Ada libraries (which come with the compiler) and system > libraries to produce the executable. > > After this point, the source code and the object code are no longer > relevant. > > The Ada libraries and the system libraries are usually dynamic libraries > (.dll on Windows), which means that they are separate entities. When you > run the .exe, the system first loads the .exe and then loads all the > .dlls which it needs (and the ones they need, ...); then the system can > actually run the program. > > > 2)Is the ensuing (.exe) program then bound to that computer alone > > i.e. customised for running in that environment only and will require > > customising again to any other computer i.e. not generally portable > > without some attention each time. > > You don't need to worry about the system libraries, but the Ada > libraries won't be present on machines that haven't had Ada installed; > and they must match the .exe, so you can't mix a GNAT GPL 2014 .exe > with a GNAT GPL 2013 .dll. > > The simple way round this is to supply the .exe and the (Ada) .dlls it > needs in one directory. > > On my machine, the .dlls are libgnat-2014.dll and libgnarl-2014.dll, > both in C:\GNAT\2014\lib\gcc\i686-pc-mingw32\4.7.4\adalib (together with > a *lot* of other files!) > > And, of course, this is Windows; you can't run the same .exe on Linux or > Mac. Many ,many thanks Simon - this is the advice I needed - I have no pretentions to being an Ada developer or indeed anything more than a hardworking problem solver on the back of a very successful career running ships. Best Wishes - Austin O'Byrne