From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21628 invoked by alias); 25 Sep 2006 01:26:04 -0000 Received: (qmail 21620 invoked by uid 22791); 25 Sep 2006 01:26:03 -0000 X-Spam-Check-By: sourceware.org Received: from bay0-omc1-s2.bay0.hotmail.com (HELO bay0-omc1-s2.bay0.hotmail.com) (65.54.246.74) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 25 Sep 2006 01:26:02 +0000 Received: from hotmail.com ([65.54.224.17]) by bay0-omc1-s2.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Sun, 24 Sep 2006 18:26:00 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 24 Sep 2006 18:26:00 -0700 Message-ID: Received: from 65.54.224.200 by by105fd.bay105.hotmail.msn.com with HTTP; Mon, 25 Sep 2006 01:25:55 GMT X-Sender: jeremy_sheldon@hotmail.com In-Reply-To: <45170E64.2010308@telia.com> From: "Jeremy Sheldon" To: gcc-help@gcc.gnu.org Bcc: Subject: Re: g++ -ldl Date: Mon, 25 Sep 2006 01:26:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-09/txt/msg00250.txt.bz2 >From: David Sveningsson >To: Jeremy Sheldon >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