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,ea23515df84d245f X-Google-Attributes: gid103376,public From: stachour@winternet.com (Paul D. Stachour) Subject: Re: static vs dynamic linking with GNAT Date: 1996/07/02 Message-ID: #1/1 X-Deja-AN: 163299774 references: <1996Jun25.144322.24751@hrbicf> organization: StarNet Communications, Inc newsgroups: comp.lang.ada Date: 1996-07-02T00:00:00+00:00 List-Id: 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