chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Implementing a C-API to a chicken library


From: Isak Andersson
Subject: [Chicken-users] Implementing a C-API to a chicken library
Date: Fri, 9 May 2014 16:56:46 +0200

Hello!

I am currently trying to see if Chicken is a viable option for what I am trying to do where I work.

Basically I want to define a C API (because that's easy to call from all languages) that will be used on many platforms
(ios, android, winrt, windows, osx etc).

So what I did was that I created a simple test with the following source code:
https://gist.github.com/BitPuffin/f8ad6fa6f43327a84611
(swap - for / because github gists don't allow / in filenames)

This also shows me running it, and as you can see I am getting a segmentation fault that I don't really understand. I also checked the static library if all the symbols where there (and they are) and also ran it through a debugger:
https://gist.github.com/BitPuffin/6093a5382a4cf357817b
and
https://gist.github.com/BitPuffin/39288172adc487609acd
respectively.

Note that I am not looking to embed it as a scripting language and do CHICKEN_run, rather, I'm trying to define the interface as something callable from C, but so far I am having no success.

Anyone have any ideas?

Thanks! :)

Isak Andersson

reply via email to

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