From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Harig Newsgroups: gmane.lisp.guile.bugs Subject: Re: Can not work with libguile-2.0 Date: Thu, 17 Feb 2011 14:08:00 -0500 Message-ID: <8CD9CED2114C060-235C-1E45A@Webmail-m118.sysops.aol.com> References: <1e640654.925f.12e338022b5.Coremail.lispor@163.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1297969717 972 80.91.229.12 (17 Feb 2011 19:08:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Feb 2011 19:08:37 +0000 (UTC) To: lispor@163.com, bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Feb 17 20:08:33 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pq9DM-0007dB-QV for guile-bugs@m.gmane.org; Thu, 17 Feb 2011 20:08:32 +0100 Original-Received: from localhost ([127.0.0.1]:59843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq9DM-0001AZ-9Z for guile-bugs@m.gmane.org; Thu, 17 Feb 2011 14:08:32 -0500 Original-Received: from [140.186.70.92] (port=42483 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq9DG-00016k-AJ for bug-guile@gnu.org; Thu, 17 Feb 2011 14:08:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pq9DE-0000qX-UV for bug-guile@gnu.org; Thu, 17 Feb 2011 14:08:26 -0500 Original-Received: from imr-ma02.mx.aol.com ([64.12.206.40]:62885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pq9DE-0000qS-O0 for bug-guile@gnu.org; Thu, 17 Feb 2011 14:08:24 -0500 Original-Received: from imo-ma03.mx.aol.com (imo-ma03.mx.aol.com [64.12.78.138]) by imr-ma02.mx.aol.com (8.14.1/8.14.1) with ESMTP id p1HJ8AaZ006924; Thu, 17 Feb 2011 14:08:10 -0500 Original-Received: from idirectscm@aim.com by imo-ma03.mx.aol.com (mail_out_v42.9.) id 7.fcf.c78cbc0 (43837); Thu, 17 Feb 2011 14:08:09 -0500 (EST) Original-Received: from smtprly-mc02.mx.aol.com (smtprly-mc02.mx.aol.com [64.12.95.98]) by cia-dc03.mx.aol.com (v129.7) with ESMTP id MAILCIADC032-d3d54d5d7210345; Thu, 17 Feb 2011 14:08:08 -0500 Original-Received: from Webmail-m118 (webmail-m118.sim.aol.com [64.12.224.208]) by smtprly-mc02.mx.aol.com (v129.8) with ESMTP id MAILSMTPRLYMC027-d3d54d5d7210345; Thu, 17 Feb 2011 14:08:00 -0500 X-AOL-IP: 98.185.24.91 In-Reply-To: <1e640654.925f.12e338022b5.Coremail.lispor@163.com> X-MB-Message-Source: WebUI X-MB-Message-Type: User X-Mailer: AIM WebMail 33222-STANDARD Original-Received: from 98.185.24.91 by Webmail-m118.sysops.aol.com (64.12.224.208) with HTTP (WebMailUI); Thu, 17 Feb 2011 14:08:00 -0500 X-AOL-SENDER: idirectscm@aim.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 64.12.206.40 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5176 Archived-At: > I run the mannal cmd and also have something wrong: > ---->cut here<---- > $ gcc -shared -o libguile-bessel.so -fPIC t1.c > t1.c:2:22: error: libguile.h: No such file or directory > t1.c:5: error: expected =E2=80=98=3D=E2=80=99, =E2=80=98,=E2=80=99, =E2= =80=98;=E2=80=99, =E2=80=98asm=E2=80=99 or =E2=80=98__attribute__=E2=80=99= =20 before > =E2=80=98j0_wrapper=E2=80=99 > t1.c: In function =E2=80=98init_bessel=E2=80=99: > t1.c:13: error: =E2=80=98j0_wrapper=E2=80=99 undeclared (first use in th= is function) > t1.c:13: error: (Each undeclared identifier is reported only once > t1.c:13: error: for each function it appears in.) > ---->cut here<---- > But when I run cmd: > gcc -shared -o libguile-bessel.so -fPIC t1.c `pkg-config --cflags=20 --libs > guile-2.0` > everything is OK! Agreed. The command listed in section 2.4 "Writing Guile Extensions" should follow the pattern used in section 2.3 "Linking Guile into Programs," namely, add the 'pkg-config' command to provide the appropriate command-line options for the preprocessor, compiler, and linker. In addition, the manual should mention that the environment variable 'PKG_CONFIG_PATH' needs to be set before invoking the compiler. Something like the following needs to be added, along with some explanatory text: $ export PKG_CONFIG_PATH=3D/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH $ gcc -shared -o libguile-bessel.so -fPIC t1.c `pkg-config --cflags=20 --libs guile-2.0` The manual should provide this extra detail so that new users can simply follow the steps listed without having to refer to external documents. --