From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: Re: Initial SCTP support for the upcoming 1.6.5 release Date: Mon, 16 Aug 2004 13:44:43 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87ekm67wis.fsf@trouble.defaultvalue.org> References: <28C61BE4-EB92-11D8-9129-000D932C78D8@lurchi.franken.de> <02FA4EE0-EFA6-11D8-B63D-000D932C78D8@lurchi.franken.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1092681929 26819 80.91.224.253 (16 Aug 2004 18:45:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Aug 2004 18:45:29 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Aug 16 20:45:19 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BwmTu-00005V-00 for ; Mon, 16 Aug 2004 20:45:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BwmY1-0003rI-8v for guile-devel@m.gmane.org; Mon, 16 Aug 2004 14:49:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BwmXy-0003r3-J1 for guile-devel@gnu.org; Mon, 16 Aug 2004 14:49:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BwmXx-0003qr-0T for guile-devel@gnu.org; Mon, 16 Aug 2004 14:49:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BwmXw-0003qo-TI for guile-devel@gnu.org; Mon, 16 Aug 2004 14:49:28 -0400 Original-Received: from [66.93.216.237] (helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BwmTg-0004h4-TM for guile-devel@gnu.org; Mon, 16 Aug 2004 14:45:05 -0400 Original-Received: from trouble.defaultvalue.org (omen.defaultvalue.org [192.168.1.1]) by defaultvalue.org (Postfix) with ESMTP id EB6EA410F; Mon, 16 Aug 2004 13:45:01 -0500 (CDT) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id B0D2F3C1001; Mon, 16 Aug 2004 13:44:43 -0500 (CDT) Original-To: Michael Tuexen In-Reply-To: <02FA4EE0-EFA6-11D8-B63D-000D932C78D8@lurchi.franken.de> (Michael Tuexen's message of "Mon, 16 Aug 2004 19:02:10 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3964 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3964 Michael Tuexen writes: > I'm trying to build the SCTP support as a loadable module. > > Is there any documentation available (or an example) where > I can figure out how I can solve the questions described > below. > > I looked in the guile sources, but only found modules defined > in scheme... In general, C-only modules are deprecated. The recommendation is that you create a small .scm file for your module, and then have that load your shared library and export your symbols, i.e.: (define-module (pcre)) ;; exports at end of file. (let ((lib "libguile-pcre-v-1") (init-func "libguile_pcre_init")) (if (string=? (substring (version) 0 3) "1.4") (dynamic-call init-func (dynamic-link lib)) (load-extension lib init-func))) ;; make any scheme side defines you that want to here. ;; export things here (though you could also do this above, or in ;; the define-module statement) ;; these exports will often be symbols that were defined during your ;; _init function above (export PCRE_MAJOR) (export PCRE_MINOR) ... Now, presuming that your .scm file is in the %load-path (via GUILE_LOAD_PATH, or whatever), and your shared library is in the LD_LIBRARY_PATH (or default ld.so locations), then (use-modules (pcre)) should work just fine. -- Rob Browning rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel