[Ecls-list] Undeclared identifier when compilng a defcallback‏

Ramon Casanova chingodemecos at gmail.com
Fri Dec 11 23:12:20 UTC 2009

Hi, I get "error C2065: 'ecl_callback_0' : undeclared identifier" error when
compiling a ffi:defcallback.

For instance, I'm unable to compile the following defun (using the MSVC
version of ECL):

(defun prepare-callback ()
  (ffi:defcallback mycallback :int () (+ 3 4)))

The only workarround I found is to put a forward declaration before my
defun, that is:

(ffi:clines "static int ecl_callback_0();")
(defun prepare-callback ()
  (ffi:defcallback mycallback :int () (+ 3 4)))

This way, I can use the callback from C, but this is not a valid solution
for me, since this forward declaration depends on the signature of the
defined callback.

Any feedback will be wellcome,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20091212/baa7cbe3/attachment.html>

More information about the ecl-devel mailing list