Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error with a single c-define #547

Open
refrogerator opened this issue Nov 13, 2024 · 0 comments
Open

Compile error with a single c-define #547

refrogerator opened this issue Nov 13, 2024 · 0 comments

Comments

@refrogerator
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant