From owner-freebsd-ports Tue Mar 19 21:57:26 2002 Delivered-To: freebsd-ports@freebsd.org Received: from alcatraz.iptelecom.net.ua (alcatraz.iptelecom.net.ua [212.9.224.15]) by hub.freebsd.org (Postfix) with ESMTP id A9F8537B405 for ; Tue, 19 Mar 2002 21:57:21 -0800 (PST) Received: from ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by alcatraz.iptelecom.net.ua (8.9.3/8.9.3) with ESMTP id HAA26765; Wed, 20 Mar 2002 07:57:16 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Received: from h188.228.dialup.iptcom.net (h188.228.dialup.iptcom.net [212.9.228.188]) by ipcard.iptcom.net (8.9.3/8.9.3) with ESMTP id HAA70843; Wed, 20 Mar 2002 07:57:14 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Subject: Re: From: Maxim Sobolev To: Joseph Argiro Cc: ports@FreeBSD.org In-Reply-To: <000801c1cf8a$20804c00$0300a8c0@mdltwn1.nj.home.com> References: <000801c1cf8a$20804c00$0300a8c0@mdltwn1.nj.home.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1016603534.95975.10.camel@notebook> Mime-Version: 1.0 X-Mailer: Evolution/1.0.2 Date: 20 Mar 2002 07:57:09 +0200 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, 2002-03-19 at 23:07, Joseph Argiro wrote: > is there an api for run time linking of libraries and/or .o files > if so can you direct me to the functions > an example would be even better man dlopen man dlsym short example: typedef int (*func_t)(char *, int); void handle; func_t func; handle = dlopen("/usr/local/lib/libfoo.so", RTLD_LAZY); if (handle == NULL) errx(1, "%s", dlerror()); func = (func_t)dlsym(handle, "foofunction"); if (func == NULL) errx(1, "%s", dlerror()); func("bar", 1000); dlclose(handle); -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message