From owner-freebsd-questions@FreeBSD.ORG Wed Mar 26 22:18:04 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA1A61065670 for ; Wed, 26 Mar 2008 22:18:04 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 74DAB8FC15 for ; Wed, 26 Mar 2008 22:18:04 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.2/8.14.2) id m2QMI301048595; Wed, 26 Mar 2008 17:18:03 -0500 (CDT) (envelope-from dan) Date: Wed, 26 Mar 2008 17:18:03 -0500 From: Dan Nelson To: Steve Franks Message-ID: <20080326221803.GB28690@dan.emsphone.com> References: <539c60b90803261439n3fcec73by3d547400c1828606@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <539c60b90803261439n3fcec73by3d547400c1828606@mail.gmail.com> X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.17 (2007-11-01) Cc: User Questions Subject: Re: freebsd equiv of libdl.a (load shared libs) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2008 22:18:04 -0000 In the last episode (Mar 26), Steve Franks said: > I am porting a linux app which is looking for libdl.a (which I > understand from googling is related to loading of shared libs). The > app makes a libusb-based shared lib. FreeBSD uses shared libs, so I > assume there is equivalent functionality somewhere. I also see > libdl.a in /compat/linux/lib, but I assume if I link a native FreeBSD > app against this, fireworks will be the only result. I further > assume since I got no error from gcc, that some freebsd header > actally points to the exact functions expected in libdl.a, so they > are in there somewhere.... The dlopen/dlsym functions are built into libc on FreeBSD, so there's no need for a libdl: DLOPEN(3) FreeBSD Library Functions Manual DLOPEN(3) NAME dlopen, dlsym, dlfunc, dlerror, dlclose -- programmatic interface to the dynamic linker LIBRARY Standard C Library (libc, -lc) -- Dan Nelson dnelson@allantgroup.com