[Top][All Lists]

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

Re: [Chicken-users] Trouble with FFI and 64 bit machines

From: Stephen Eilert
Subject: Re: [Chicken-users] Trouble with FFI and 64 bit machines
Date: Fri, 8 Oct 2010 16:26:48 -0300

On Fri, Oct 8, 2010 at 3:58 PM, Peter Bex <address@hidden> wrote:
> I'm not sure if that's the problem with your egg, but this results in a
> compiler warning because there's no prototype for that function, so
> C assumes the return value's type is 'int', which is indeed a different
> size than void * on x86_64.
> Adding (foreign-declare "void *mkd_in(void *, int);") in front of that
> code causes it to compile without warnings.
> Perhaps you should figure out whether the header file is being included
> properly.  Maybe you can temporarily put a "#error hi" just before the
> function's prototype in the header file, so you can see if it's not
> skipping the prototype due to a #ifdef or something equally silly.

The reason was something even more silly: I was not including the
header file at all. Turning on -Wall reveals that yes, the prototype
was missing. GCC is appeased now.

I'll test it on OSX later, but it is likely that this will fix the problem.



Sent from my Emacs

reply via email to

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