guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile, C++, and Mac OS X 10.4 (powerpc)


From: Hans Aberg
Subject: Re: Guile, C++, and Mac OS X 10.4 (powerpc)
Date: Wed, 18 Aug 2010 16:16:52 +0200

On 18 Aug 2010, at 15:49, Ludovic Courtès 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.  :-)

I got those when doing a templates in a C++ wrap, and just assumed it had something to do with that SCM was a pointer.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]