From: "Jeremy Sheldon" <jeremy_sheldon@hotmail.com>
To: gcc-help@gcc.gnu.org
Subject: Re: g++ -ldl
Date: Mon, 25 Sep 2006 01:26:00 -0000 [thread overview]
Message-ID: <BAY105-F715AAB6D277A23CA90C2DEB240@phx.gbl> (raw)
In-Reply-To: <45170E64.2010308@telia.com>
>From: David Sveningsson <david.sveningsson@telia.com>
>To: Jeremy Sheldon <jeremy_sheldon@hotmail.com>
>Subject: Re: g++ -ldl
>Date: Mon, 25 Sep 2006 01:01:56 +0200
>
>Jeremy Sheldon wrote:
> > would someone please point me to the correct place to find information
> > on what the -ldl option would do for g++ ? I've looked at the gcc man
> > page and browsed google for a while and can't find much information on
> > it. I have a situation where using it clears up a few "undefined
> > reference to `dlopen'" errors and would like to understand why.
>The -l flag specifies a library to link against. In this case you are
>linking with the library dl, which is if I recall correctly a library to
>handle dynamic libraries in you application. At least dl contains dlsym,
>dlopen, dlclose etc.
Thank you Mr. Sveningsson. This is exactly the information for which I was
hunting.
>You should be able to find out information about the dl library using these
>commands:
>man dlopen
>man dlclose
>man dlsym
>man dlerror
>
>HTH,
>--Eljay
Eljay, I had been in that manual and, sure enough, way down at the bottom in
the "example" section the -ldl option is on the "how to compile the example"
line. It was one of the things that caused me to believe that it was, in
fact, the correct way to compile my code. However, it isn't explained at
all and I still questioned exactly what it did.
Much Thanks to both of you who responded!
sheldon
next parent reply other threads:[~2006-09-25 1:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <45170E64.2010308@telia.com>
2006-09-25 1:26 ` Jeremy Sheldon [this message]
2006-09-24 21:36 Jeremy Sheldon
2006-09-24 23:12 ` John (Eljay) Love-Jensen
2006-09-25 1:35 ` Amit Choudhary
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=BAY105-F715AAB6D277A23CA90C2DEB240@phx.gbl \
--to=jeremy_sheldon@hotmail.com \
--cc=gcc-help@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).