Hi, Hans Aberg <haber...@telia.com> 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’.