From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hans Aberg Newsgroups: gmane.lisp.guile.user Subject: Re: Guile, C++, and Mac OS X 10.4 (powerpc) Date: Wed, 18 Aug 2010 16:16:52 +0200 Message-ID: <24D99500-49FC-4EDC-8F1A-31E5E51399C2@telia.com> References: <501CC8FC-0348-4E6D-87D7-67AD82CD45B1@telia.com> <87mxskni8o.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1282141078 14402 80.91.229.12 (18 Aug 2010 14:17:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Aug 2010 14:17:58 +0000 (UTC) Cc: guile-user@gnu.org To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Aug 18 16:17:57 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 1OljSj-00067S-KE for guile-user@m.gmane.org; Wed, 18 Aug 2010 16:17:57 +0200 Original-Received: from localhost ([127.0.0.1]:45379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OljSe-0006wJ-3O for guile-user@m.gmane.org; Wed, 18 Aug 2010 10:17:48 -0400 Original-Received: from [140.186.70.92] (port=48079 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OljRr-0006bP-8B for guile-user@gnu.org; Wed, 18 Aug 2010 10:17:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OljRm-0001GB-Mk for guile-user@gnu.org; Wed, 18 Aug 2010 10:16:55 -0400 Original-Received: from smtp-out21.han.skanova.net ([195.67.226.208]:41293) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OljRm-0001Fs-F6; Wed, 18 Aug 2010 10:16:54 -0400 Original-Received: from h131n2-fre-d2.ias.bredband.telia.com (78.72.157.131) by smtp-out21.han.skanova.net (8.5.114) (authenticated as u26619196) id 4BC6D350029452FC; Wed, 18 Aug 2010 16:16:52 +0200 In-Reply-To: <87mxskni8o.fsf@gnu.org> X-Mailer: Apple Mail (2.936) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:8074 Archived-At: On 18 Aug 2010, at 15:49, Ludovic Court=E8s 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 =20 >>> '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=92t 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 =20 > here: > > http://savannah.gnu.org/bugs/?23681 > > I fixed a few of these in Guile 1.9, but not all of them, and not > =91scm_c_define_gsubr=92 in particular. > > I would appreciate patches in this area. :-) I got those when doing a templates in a C++ wrap, and just assumed it =20= had something to do with that SCM was a pointer.