unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Hans Aberg <haberg-1@telia.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-user@gnu.org
Subject: Re: Guile, C++, and Mac OS X 10.4 (powerpc)
Date: Wed, 18 Aug 2010 16:16:52 +0200	[thread overview]
Message-ID: <24D99500-49FC-4EDC-8F1A-31E5E51399C2@telia.com> (raw)
In-Reply-To: <87mxskni8o.fsf@gnu.org>

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	other threads:[~2010-08-18 14:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 19:49 Guile, C++, and Mac OS X 10.4 (powerpc) Mike Solomon
2010-07-28 21:19 ` Hans Aberg
2010-07-29  8:04   ` Mike Solomon
2010-07-29 12:43     ` Linas Vepstas
2010-08-18 13:49   ` Ludovic Courtès
2010-08-18 14:16     ` Hans Aberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24D99500-49FC-4EDC-8F1A-31E5E51399C2@telia.com \
    --to=haberg-1@telia.com \
    --cc=guile-user@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).