From owner-freebsd-questions Thu Oct 9 05:59:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA28637 for questions-outgoing; Thu, 9 Oct 1997 05:59:01 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from localhost.zilker.net (jump-x2-0146.jumpnet.com [207.8.61.146]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA28617 for ; Thu, 9 Oct 1997 05:58:48 -0700 (PDT) (envelope-from marquard@zilker.net) Received: (from marquard@localhost) by localhost.zilker.net (8.8.7/8.8.3) id HAA17939; Thu, 9 Oct 1997 07:58:40 -0500 (CDT) To: freebsd-questions@freebsd.org Subject: Re: adding C code to tcl and perl References: <199710090811.KAA05104@tac.silab.dsi.unimi.it> From: Dave Marquardt Date: 09 Oct 1997 07:58:09 -0500 In-Reply-To: Marco Molteni's message of Thu, 09 Oct 1997 10:11:42 METDST Message-ID: <8567r76qla.fsf@localhost.zilker.net> Lines: 21 X-Mailer: Gnus v5.3/Emacs 19.34 Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Marco Molteni writes: > Now correct me if I'm wrong. I'm really disappointed to see that > the only way to add new commands to tcl is compiling and linking > a new tclsh or a new wish, while, if I use perl, I can simply add > a require or use instruction (or similar) in the script from wich > I want to use a C package (I know that obviously the package > or library or how you call it must be linked with the perl library). No, that's certainly not the only way to add new commands to Tcl. You can use the Tcl package facility to load a shared object or shared library into tclsh or wish. You might go look at some of the extensions listed in and see how they set up their package files and such. Also, you'll need to make sure tclsh and wish are compiled to enable loading of shared libraries. If you need more help, check the newsgroup comp.lang.tcl, or feel free to send me e-mail. -Dave