From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: Guile, C++, and Mac OS X 10.4 (powerpc) Date: Wed, 18 Aug 2010 15:49:27 +0200 Message-ID: <87mxskni8o.fsf@gnu.org> References: <501CC8FC-0348-4E6D-87D7-67AD82CD45B1@telia.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1282139411 6386 80.91.229.12 (18 Aug 2010 13:50:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Aug 2010 13:50:11 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Aug 18 15:50:10 2010 Return-path: Envelope-to: guile-user@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 1Olj1t-0005X4-CG for guile-user@m.gmane.org; Wed, 18 Aug 2010 15:50:09 +0200 Original-Received: from localhost ([127.0.0.1]:57496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Olj1s-000136-MJ for guile-user@m.gmane.org; Wed, 18 Aug 2010 09:50:08 -0400 Original-Received: from [140.186.70.92] (port=50569 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Olj1X-00012m-35 for guile-user@gnu.org; Wed, 18 Aug 2010 09:49:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Olj1V-0004zX-S7 for guile-user@gnu.org; Wed, 18 Aug 2010 09:49:46 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:56843) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Olj1V-0004zC-MV for guile-user@gnu.org; Wed, 18 Aug 2010 09:49:45 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Olj1P-0005Dh-DK for guile-user@gnu.org; Wed, 18 Aug 2010 15:49:39 +0200 Original-Received: from yoda.fdn.fr ([80.67.169.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 18 Aug 2010 15:49:39 +0200 Original-Received: from ludo by yoda.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 18 Aug 2010 15:49:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: yoda.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 Fructidor an 218 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:boMIJ9uLZYXpfpxkdqaZCIHn7pc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8069 Archived-At: Hi, Hans Aberg writes: > On 28 Jul 2010, at 21:49, Mike Solomon wrote: > >> Hey guile users, >> Trying to compile the simple example bessel.c from >> Writing-Guile-Extensions.html (renamed bessel.cc because I'm using >> g+ >> +), I >> encountered the following error: >> >> bessel.cc: In function 'void init_bessel()': >> bessel.cc:13: error: invalid conversion from 'scm_unused_struct* >> (*)(scm_unused_struct*)' to 'scm_unused_struct* (*)(...)' >> bessel.cc:13: error: initializing argument 5 of 'scm_unused_struct* >> scm_c_define_gsubr(const char*, int, int, int, scm_unused_struct* >> (*) >> (...))' > > The SCM type is a pointer to an undefined C type - C hack, which > clashes with C++. Clever in C, but bad for C++ users. I don’t think that this is the cause of the problem. The problem instead stems from use of function declarators with empty parenthesis, which is also an obsolescent C feature, as discussed here: http://savannah.gnu.org/bugs/?23681 I fixed a few of these in Guile 1.9, but not all of them, and not ‘scm_c_define_gsubr’ in particular. I would appreciate patches in this area. :-) Thanks, Ludo’.