From owner-freebsd-hackers Mon Feb 14 12: 0:20 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by builder.freebsd.org (Postfix) with ESMTP id 333353DD1 for ; Mon, 14 Feb 2000 12:00:18 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) id MAA23987; Mon, 14 Feb 2000 12:27:01 -0800 (PST) Date: Mon, 14 Feb 2000 12:27:01 -0800 From: Alfred Perlstein To: Pradesh Chanderpaul Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Help me understand dlopen/dlsy Message-ID: <20000214122701.U17536@fw.wintelcom.net> References: <200002141400.GAA29194@www.geocrawler.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200002141400.GAA29194@www.geocrawler.com>; from archiver@db.geocrawler.com on Mon, Feb 14, 2000 at 06:00:21AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Pradesh Chanderpaul [000214 06:33] wrote: > This message was sent from Geocrawler.com by "Pradesh Chanderpaul" > Be sure to reply to that address. > > Hello All > > I know that this question is more suited to the general > questions mailing group, but I tried, and failed to obtain > a response. So could someone please provide guidance with this > topic. I have searched the mailing lists, man pages and the > net at large without getting a satisfactory understanding. > > Consider the following scenario. > > I need to compile a program consisting of two source files > and a makefile > > file1.c > ------- > #include > #include > #include > > int main() { > void *handle; > void (*myhellofunc)(void); > char *c; > > handle = dlopen(NULL, 1); > c = dlerror(); > > if (c) abort_with_error(c); > > myhellofunc = dlsym(handle, "_helloworld"); try "helloworld" (drop the '_') -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message