cyclone
cyclone copied to clipboard
Compile error with a single c-define
Trying to write some raylib bindings i have discovered that having a single c-define in your library generates a compiler error:
code:
;; raylib/main.sld
(define-library (raylib main)
(export init-window)
(import (scheme base)
(scheme write)
(cyclone foreign))
(include-c-header "<raylib.h>")
(c-linker-options "-lraylib")
(begin
(c-define init-window c-void "InitWindow" int int string)))
error:
Error: (Unhandled expansion (define-c init-window (void *data, int argc, closure _, object k , object arg_738, object arg_7315, object arg_7322) Cyc_check_fixnum(data,arg_738);Cyc_check_fixnum(data,arg_7315);Cyc_check_str(data,arg_7322);InitWindow(obj_obj2int(arg_738),obj_obj2int(arg_7315),string_str(arg_7322));return_closcall1(data, k, Cyc_VOID);)):
adding something else to the library, for example (define test 2), makes the error go away