From owner-freebsd-hackers Thu Feb 5 17:42:56 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA17889 for hackers-outgoing; Thu, 5 Feb 1998 17:42:56 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (lapdog.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA17868; Thu, 5 Feb 1998 17:42:43 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.8.8/8.8.5) with ESMTP id MAA01875; Fri, 6 Feb 1998 12:03:41 +1030 (CST) Message-Id: <199802060133.MAA01875@dingo.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Ruslan Shevchenko cc: config@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: TCL API published. In-reply-to: Your message of "Thu, 05 Feb 1998 00:41:54 +0200." <34D8EEB0.2AF4C769@Shevchenko.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 06 Feb 1998 12:03:41 +1030 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" > > Anybody know, is dynamic library loading from Tcl in run-time work in > FreeBSD ? Yes. > if work, how to do it, without generation of Tcl Interpeter for each > extension. ? For an extension called "foo", export a single symbol from your library called "Foo_Init" (casing is important) which defines your new commands/ namespaces/etc. Build a shared library using a Makefile, eg. LIB= foo SRCS= foo.c SHLIB_MAJOR= 1 SHLIB_MINOR= 0 # No static library INTERNALLIB= yes # No profiled library NOPROFILE= yes .include Then load it with the 'load' command, or "package require". -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\