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.