From: "John T. Williams" <jtwilliams@vt.edu>
To: linux-c-programming@vger.kernel.org
Subject: linking at run time.
Date: Thu, 10 Jul 2003 02:50:48 -0700 [thread overview]
Message-ID: <003501c346c8$d32cd4c0$ed64a8c0@descartes> (raw)
In-Reply-To: 16140.52121.385331.351810@cerise.nosuchdomain.co.uk
Is there a way to cause an exicutable to link against a specific library at
run time.
let me explain a little
I'm creating a dynamic library like this
$ gcc pop3.c -o libpop3.so -shared -I../include
then creating an exicutable like this
$ gcc main.c -o getmail -L../lib -I../include -lpop3
both work fine.
in order to run my exicutable I have been copying my libpop3.so file to
/use/lib
then running ldconfig
and the file exicutes fine. but its a bit of a pain in the butt to do this
every time I recompile the library.
I was wondering if there was any way to run my program, getmail, so that ldd
would link it against a specified file so that I didn't have to put a
library that I'm developing into my /usr/lib folder. nor have to run
ldconfig as root.
I hope this makes sense.
next prev parent reply other threads:[~2003-07-10 9:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-08 13:17 what causes SIGTERMs? Matthew Studley
2003-07-08 13:26 ` Francis Lau
2003-07-08 14:27 ` Glynn Clements
2003-07-09 15:36 ` Matthew Studley
2003-07-10 2:12 ` Glynn Clements
2003-07-10 9:50 ` John T. Williams [this message]
2003-07-10 7:18 ` linking at run time nanakos
2003-07-10 8:34 ` Mohan Rao A. J.
2003-07-11 9:51 ` Progga
2003-07-22 14:54 ` what causes SIGTERMs? Matthew Studley
2003-07-22 15:11 ` Jan-Benedict Glaw
2003-07-22 20:47 ` Glynn Clements
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='003501c346c8$d32cd4c0$ed64a8c0@descartes' \
--to=jtwilliams@vt.edu \
--cc=linux-c-programming@vger.kernel.org \
/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 NNTP newsgroup(s).