Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: swettk@my-deja.com
Subject: Re: Linking Statically & Dynamically with GCC
Date: 2000/01/19	[thread overview]
Message-ID: <865b59$pch$1@nnrp1.deja.com> (raw)
In-Reply-To: 85opbb$i6n$1@news.ndsu.nodak.edu

Thanks to both for your advice.

I used the -Wl,-no_so and -Wl,-no_archive and it worked
like a charm.

Karin


In article <85opbb$i6n$1@news.ndsu.nodak.edu>,
  mooney@dogbert.cc.ndsu.NoDak.edu (Tim Mooney) wrote:
> In article <85d6ah$esg$1@nnrp1.deja.com>,  <swettk@my-deja.com> wrote:
> > I'm installing software on osf1 v4.0 that requires some libraries to
be
> > linked statically and others dynamically. On other platforms (SunOS,
> > LINUX, and IRIX), I have successfully used the -Wl,-Bstatic and
> > -Wl,Bdynamic flags, but these flags are unrecognized on this
platform.
>
> -Wl says "pass the following option to the linker".  Tru64's linker
doesn't
> grok `-Bstatic' or `-Bdynamic'.  It does grok things like
`-non_shared',
> `-no_so', et. al.  See the `ld' man page.  You probably need multiple
> occurrences of `-no_so' and `-no_archive' to arrange to have just
certain
> library linked in statically.  Tru64's linker doesn't have
(unfortunately)
> a `-prefer_static' or `-archive_shared' option, a la HP-UX's linker.
You
> may also need to pay special attention to the `-oldstyle_liblookup'
flag.
>
> gcc and g++ have their own options to indicate you want to do static
or shared
> linking.  See the gcc info node for "Link Options".  Passing (e.g.)
-static
> to the compiler causes it to pass the appropriate flags to the linker
for
> the platform it's on.
>
> If you're using gcc 2.95.1, I ran into what I think is a bug with how
gcc
> passes options to programs it invokes on your behalf (such as ld).  I
don't
> know if that's been fixed in 2.95.2, but it caused some arguments to
not
> be passed on correctly.
>
> Tim
>
> > Thanks in advance,
> > Karin
> --
> Tim Mooney
mooney@dogbert.cc.ndsu.NoDak.edu
> Information Technology Services         (701) 231-1076 (Voice)
> Room 242-J1, IACC Building              (701) 231-8541 (Fax)
> North Dakota State University, Fargo, ND 58105-5164
>


Sent via Deja.com http://www.deja.com/
Before you buy.



  reply	other threads:[~2000-01-19  5:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-10  5:00 Linking Statically & Dynamically with GCC swettk
2000-01-13  5:00 ` Joe Mario
2000-01-15  5:00 ` Tim Mooney
2000-01-19  5:00   ` swettk [this message]
2000-02-17  5:00     ` swettk
2000-02-17  5:00     ` swettk
read-only archive

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