comp.lang.ada
 help / color / mirror / Atom feed
* static vs dynamic linking with GNAT
@ 1996-06-25  0:00 Ken Slater
  1996-07-02  0:00 ` Paul D. Stachour
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Slater @ 1996-06-25  0:00 UTC (permalink / raw)



I am running GNAT on a Silicon Graphics (SGI) system using Irix 5.3.

We have built an executable on the host machine and want to also run on
a target machine on which GNAT has not been installed. The problem is
that the executable was linked with the shared library file
'libgnat.so', so when the executable is run on the target machine,
it looks for 'libgnat.so'.

Is there a way to force 'gcc' to link in the static libraries (libgnat.a).
I tried the '-static' option without success (I may have missed
something)?

Thanks.




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

* Re: static vs dynamic linking with GNAT
  1996-06-25  0:00 static vs dynamic linking with GNAT Ken Slater
@ 1996-07-02  0:00 ` Paul D. Stachour
  0 siblings, 0 replies; 2+ messages in thread
From: Paul D. Stachour @ 1996-07-02  0:00 UTC (permalink / raw)



kls@icf.hrb.com (Ken Slater) writes:

>I am running GNAT on a Silicon Graphics (SGI) system using Irix 5.3.

>We have built an executable on the host machine and want to also run on
>a target machine on which GNAT has not been installed. The problem is
>that the executable was linked with the shared library file
>'libgnat.so', so when the executable is run on the target machine,
>it looks for 'libgnat.so'.

>Is there a way to force 'gcc' to link in the static libraries (libgnat.a).
>I tried the '-static' option without success (I may have missed
>something)?

>Thanks.

I don't know about gnat, but for other things which I have done
on sun-solaris, I have ensured that the LD_LIBRAY_PATH in the
process that does the linking does *not* contain the directory
that the ".so's" are in, and that the ".so's" are *not* in
any of the directories findable by the -L parameter to gcc.

Often, the easiest way to do this, if you have control of the names,
is totemporarliy rename the x.so to x.dll or some other name.
--
Paul D. Stachour, Software Engineer and Methodologist
9532 First Avenue South                 260-6A-08 3M Center
Bloomington, Minnesota 55420            St. Paul, Minnesota 55144
(612)-884-5977  stachour@winternet.com  (612)-733-5217  pdstachour@mmm.com




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

end of thread, other threads:[~1996-07-02  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-25  0:00 static vs dynamic linking with GNAT Ken Slater
1996-07-02  0:00 ` Paul D. Stachour

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