comp.lang.ada
 help / color / mirror / Atom feed
From: Austin Obyrne <austin.obyrne@hotmail.com>
Subject: Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
Date: Fri, 6 Feb 2015 00:14:34 -0800 (PST)
Date: 2015-02-06T00:14:34-08:00	[thread overview]
Message-ID: <ec853c0e-2511-4021-882f-024b9a0ca653@googlegroups.com> (raw)
In-Reply-To: <ly7fvw3pd4.fsf@pushface.org>

On Thursday, February 5, 2015 at 11:33:39 PM UTC, Simon Wright wrote:
> Austin Obyrne <austin.obyrne@hotmail.com> 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

  reply	other threads:[~2015-02-06  8:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 19:00 Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ? Austin Obyrne
2015-02-05 22:25 ` David Botton
2015-02-05 22:32   ` MM
2015-02-05 22:28 ` MM
2015-02-06  0:05   ` David Botton
2015-02-06  0:57     ` Dennis Lee Bieber
2015-02-06  8:55     ` MM
2015-02-05 23:33 ` Simon Wright
2015-02-06  8:14   ` Austin Obyrne [this message]
2015-02-06 12:37     ` Denis McMahon
2015-02-06 18:12     ` MM
2015-02-06 16:50   ` Stephen Leake
2015-02-06 17:56     ` G.B.
2015-02-06 12:10 ` gautier_niouzes
2015-02-06 14:55   ` Simon Wright
2015-02-06 19:38     ` gautier_niouzes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox