From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a5ecfa241d9de067,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-22 15:20:44 PST Newsgroups: comp.unix.osf.osf1 Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!paperboy.wellfleet.com!noc.near.net!news.tufts.edu!news From: jrozes@musketeers.tufts.edu (Jonathan Rozes) Subject: Re: Passing flags from cc to ld Message-ID: Followup-To: comp.unix.osf.osf1 Keywords: cc ld dynamic linker rpath Sender: news@news.tufts.edu (USENET News System) Reply-To: jrozes@musketeers.tufts.edu Organization: The Musketeer Project - Tufts University Date: Fri, 22 Jul 1994 22:09:53 GMT 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.