comp.lang.ada
 help / color / mirror / Atom feed
* Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
@ 2015-02-05 19:00 Austin Obyrne
  2015-02-05 22:25 ` David Botton
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Austin Obyrne @ 2015-02-05 19:00 UTC (permalink / raw)




1)Would some reader confirm that this true or false and explain the mechanics of how it is done.

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.

adacrypt

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  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
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: David Botton @ 2015-02-05 22:25 UTC (permalink / raw)


On Thursday, February 5, 2015 at 2:00:16 PM UTC-5, Austin Obyrne wrote:
> 1)Would some reader confirm that this true or false and explain the mechanics of how it is done.
> 
> 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.

I assume this is homework. If we answer you would lose the experience of learning. I care about my fellow man too much to do this to you.

David Botton

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  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:28 ` MM
  2015-02-06  0:05   ` David Botton
  2015-02-05 23:33 ` Simon Wright
  2015-02-06 12:10 ` gautier_niouzes
  3 siblings, 1 reply; 16+ messages in thread
From: MM @ 2015-02-05 22:28 UTC (permalink / raw)


On Thursday, 5 February 2015 19:00:16 UTC, Austin Obyrne  wrote:
> 1)Would some reader confirm that this true or false and explain the mechanics of how it is done.
> 
> 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.

Is it really true that you don't know that the output of the compilation process
is an executable file containing machine language instructions, and that this
is an .exe file in the windows environment?

What do you think the ada compiler is? Or your IDE program?

For how long have you been using computers? Has it not occurred to you
to find out what all those extra files in your work folder are?

This may help explain why you think editing Ada source is a user interface.

M
-- 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-05 22:25 ` David Botton
@ 2015-02-05 22:32   ` MM
  0 siblings, 0 replies; 16+ messages in thread
From: MM @ 2015-02-05 22:32 UTC (permalink / raw)


On Thursday, 5 February 2015 22:26:00 UTC, David Botton  wrote:
> On Thursday, February 5, 2015 at 2:00:16 PM UTC-5, Austin Obyrne wrote:
:
> I assume this is homework. If we answer you would lose the experience
> of learning. I care about my fellow man too much to do this to you.

No. This is a sci.crypt (very) frequent poster who knows a lot less than
he claims.

This isn't homework, this is a decade+ of misconception where the first
glimmers of understanding are starting to show.

M
-- 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  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:28 ` MM
@ 2015-02-05 23:33 ` Simon Wright
  2015-02-06  8:14   ` Austin Obyrne
  2015-02-06 16:50   ` Stephen Leake
  2015-02-06 12:10 ` gautier_niouzes
  3 siblings, 2 replies; 16+ messages in thread
From: Simon Wright @ 2015-02-05 23:33 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  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
  0 siblings, 2 replies; 16+ messages in thread
From: David Botton @ 2015-02-06  0:05 UTC (permalink / raw)


> M

I was trying to be a bit humerus but in an honorable way say you need to work to get your answer on your own. I don't see any reason to be condescending to him. Perhaps this is the first course he is taking in programming, etc. everyone has to start somewhere.

David Botton


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-06  0:05   ` David Botton
@ 2015-02-06  0:57     ` Dennis Lee Bieber
  2015-02-06  8:55     ` MM
  1 sibling, 0 replies; 16+ messages in thread
From: Dennis Lee Bieber @ 2015-02-06  0:57 UTC (permalink / raw)


On Thu, 5 Feb 2015 16:05:08 -0800 (PST), David Botton <david@botton.com>
declaimed the following:

>> M
>
>I was trying to be a bit humerus but in an honorable way say you need to work to get your answer on 

	FYI: humerus is (not) a (funny) bone... humorous is an attempt a being
funny.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-05 23:33 ` Simon Wright
@ 2015-02-06  8:14   ` Austin Obyrne
  2015-02-06 12:37     ` Denis McMahon
  2015-02-06 18:12     ` MM
  2015-02-06 16:50   ` Stephen Leake
  1 sibling, 2 replies; 16+ messages in thread
From: Austin Obyrne @ 2015-02-06  8:14 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-06  0:05   ` David Botton
  2015-02-06  0:57     ` Dennis Lee Bieber
@ 2015-02-06  8:55     ` MM
  1 sibling, 0 replies; 16+ messages in thread
From: MM @ 2015-02-06  8:55 UTC (permalink / raw)


On Friday, 6 February 2015 00:05:09 UTC, David Botton  wrote:
> > M
> 
> I was trying to be a bit humerus but in an honorable way say you need
> to work to get your answer on your own. I don't see any reason to be
> condescending to him. Perhaps this is the first course he is taking in
> programming, etc. everyone has to start somewhere.

In the contrary, this person has displayed strong hostility to clue in the
past.

He is NOT taking a course, and has claimed or implied computer ability
well beyond his demonstrated capacity for over a decade.

M
-- 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-05 19:00 Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ? Austin Obyrne
                   ` (2 preceding siblings ...)
  2015-02-05 23:33 ` Simon Wright
@ 2015-02-06 12:10 ` gautier_niouzes
  2015-02-06 14:55   ` Simon Wright
  3 siblings, 1 reply; 16+ messages in thread
From: gautier_niouzes @ 2015-02-06 12:10 UTC (permalink / raw)


A few examples of OS / compiler combinations where the .exe can be built to be standalone, that is the .exe can run on another machine that never saw any Ada tool:

 - Windows / GNAT GPL (including Windows GUI stuff)
 - Windows / MinGW (including Windows GUI stuff)
 - Windows / ObjectAda (at least command-line tools)
 - Ubuntu Linux / the GNAT version provided by default

_________________________ 
Gautier's Ada programming 
http://gautiersblog.blogspot.com/search/label/Ada 
NB: follow the above link for a valid e-mail address 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-06  8:14   ` Austin Obyrne
@ 2015-02-06 12:37     ` Denis McMahon
  2015-02-06 18:12     ` MM
  1 sibling, 0 replies; 16+ messages in thread
From: Denis McMahon @ 2015-02-06 12:37 UTC (permalink / raw)


On Fri, 06 Feb 2015 00:14:34 -0800, Austin Obyrne wrote:

> I have no pretentions to being anything more than a hardworking
> problem solver

I wish you luck in finding a problem that is within your capacity to 
solve, to date it appears that you have failed to do so.

-- 
Denis McMahon, denismfmcmahon@gmail.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-06 12:10 ` gautier_niouzes
@ 2015-02-06 14:55   ` Simon Wright
  2015-02-06 19:38     ` gautier_niouzes
  0 siblings, 1 reply; 16+ messages in thread
From: Simon Wright @ 2015-02-06 14:55 UTC (permalink / raw)


gautier_niouzes@hotmail.com writes:

> A few examples of OS / compiler combinations where the .exe can be
> built to be standalone, that is the .exe can run on another machine
> that never saw any Ada tool:

Actually, for all I know OP is still running GNAT 3.15p (he was, up to a
few months ago); no idea whether that used static or dynamic libraries
by default.

It's not always as simple as it might be to force static linking.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-05 23:33 ` Simon Wright
  2015-02-06  8:14   ` Austin Obyrne
@ 2015-02-06 16:50   ` Stephen Leake
  2015-02-06 17:56     ` G.B.
  1 sibling, 1 reply; 16+ messages in thread
From: Stephen Leake @ 2015-02-06 16:50 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> 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.

Or link statically; that seems to be a skill that has been lost?

-- 
-- Stephe

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-06 16:50   ` Stephen Leake
@ 2015-02-06 17:56     ` G.B.
  0 siblings, 0 replies; 16+ messages in thread
From: G.B. @ 2015-02-06 17:56 UTC (permalink / raw)


On 06.02.15 17:50, Stephen Leake wrote:
> Simon Wright <simon@pushface.org> writes:

>> The simple way round this is to supply the .exe and the (Ada) .dlls it
>> needs in one directory.
>
> Or link statically; that seems to be a skill that has been lost?

There are/used to be a few glitches linking glibc statically on
GNU/Linux due to some networking routines that are not/were not
included in it (gethost* etc IIRC). I do not know whether or not
this applies to static linking in a GNAT-on-Windows environment.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-06  8:14   ` Austin Obyrne
  2015-02-06 12:37     ` Denis McMahon
@ 2015-02-06 18:12     ` MM
  1 sibling, 0 replies; 16+ messages in thread
From: MM @ 2015-02-06 18:12 UTC (permalink / raw)


On Friday, 6 February 2015 08:14:35 UTC, Austin Obyrne  wrote:
> ... 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.

That's an outright lie.

The way you've recently insulted people who've been really trying to help
(just not the sort of help you wanted to hear), and the sheer arrogance with
which you dismissed them tell of *GREAT* pretensions.

M
-- 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Standalone (.exe) Ada Programs can run in isolation of any ada compiler - True or False ?
  2015-02-06 14:55   ` Simon Wright
@ 2015-02-06 19:38     ` gautier_niouzes
  0 siblings, 0 replies; 16+ messages in thread
From: gautier_niouzes @ 2015-02-06 19:38 UTC (permalink / raw)


Le vendredi 6 février 2015 15:55:10 UTC+1, Simon Wright a écrit :

> Actually, for all I know OP is still running GNAT 3.15p (he was, up to a
> few months ago); no idea whether that used static or dynamic libraries
> by default.

Static linking of the GNAT run-time library on GNAT public/GPL for Windows is the default since I'm using it - I think, version 3.13p around 2000. I even don't know which option you would need to get the dynamic RTL linking and just discovered with your post it was possible on Windows!
_________________________
Gautier's Ada programming
http://gautiersblog.blogspot.com/search/label/Ada
NB: follow the above link for a valid e-mail address


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-02-06 19:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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