public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
To: <pinafl@freesurf.fr>
Cc: <gcc-help@gcc.gnu.org>
Subject: Re: shared library not  found while linking C program
Date: Fri, 16 Aug 2002 08:49:00 -0000	[thread overview]
Message-ID: <m3lm76by4d.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <57870.194.2.91.222.1029512777.squirrel@arlette.freesurf.fr> (<pinafl@freesurf.fr>'s message of "Fri, 16 Aug 2002 17:46:17 +0200 (CEST)")

<pinafl@freesurf.fr> wrote:
> GCC is called with the -L option for additionnal directory to search in.
> I'd like to use the -l option to name the right library but it is not
> recognised, GCC is then looking for a "-llibname" file and of course does
> not find it.

gcc ... /path/to/libfoo.so
is equivalent to:
gcc ... -L/path/to -lfoo.so
So use the first form if your library is not named lib*.  You'll
probably also want to add /path/to to $LD_RUN_PATH at compile time or
$LD_LIBRARY_PATH at run time, if the library isn't in one of the
system library directories.


paul

  reply	other threads:[~2002-08-16 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-16  8:46 pinafl
2002-08-16  8:49 ` Paul Jarc [this message]
     [not found] <57870.194.2.91.222.1029512777.squirrel@arlette.freesurf.fr >
2002-08-16  9:28 ` Eljay Love-Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lm76by4d.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    --cc=gcc-help@gcc.gnu.org \
    --cc=pinafl@freesurf.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).