From: jrozes@musketeers.tufts.edu (Jonathan Rozes)
Subject: Re: Passing flags from cc to ld
Date: Fri, 22 Jul 1994 22:09:53 GMT [thread overview]
Message-ID: <CtD48I.CGI@news.tufts.edu> (raw)
Hello OSFers--
I'm using DEC C v3.11 on OSF 1.3 to build a program that uses libraries installed
in non-standard paths. I need to have cc pass the '-rpath /usr/foo/lib' option to
ld but can't find a way to do so. If I simply do this on the coommand line:
cc -L/usr/foo/lib -rpath /usr/foo/lib -o prog prog.o bar.o biff.o -lfum
cc parses the options wrong and invokes the linker something like this:
ld [...] -L/usr/foo/lib -rpath -o prog /usr/foo/lib prog.o bar.o biff.o -lfum
Naturally, this bombs with a bad magic number error, since ld thinks /usr/foo/lib
is an object file. What I need is something like gcc's -Xlinker switch that tells
cc to ust blindly pass the next argument to the linker. So far, the only way I have found to get around this is to link by hand, which certainly is not acceptable.
So have I missed something or is this a misfeature of cc and/or ld? Any help would
be greatly appreciated...
Thanks,
jonathan
+++ Jonathan Rozes, jrozes@musketeers.tufts.edu, jrozes@emerald.tufts.edu
+++ http://www.cs.tufts.edu/~jrozes/
+++ Editing simplified: A one-character RE is a RE that matches whatever
the one-character RE matches. <a href=/usr/share/man/cat1/ed.1></a>
next reply other threads:[~1994-07-22 22:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-07-22 22:09 Jonathan Rozes [this message]
1994-07-25 14:33 ` Passing flags from cc to ld Frank Wortner
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