[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Embedding Chicken in C++
From: |
Ivan Raikov |
Subject: |
[Chicken-users] Embedding Chicken in C++ |
Date: |
Tue, 07 Nov 2006 11:07:42 -0500 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hello,
I am trying to embed some Chicken code in a C++ application. I
have a C++ class with a constructor that calls
CHICKEN_intitialize(0, 0, 0, (void*)C_toplevel), and that call returns
0. Another method in the class subsequently makes the following call:
C_word result = C_SCHEME_UNDEFINED;
int status;
status = CHICKEN_eval_string("(repl)", &result);
Unfortunately, this causes a segmentation fault. I have also tried
calling CHICKEN_run((void*)CHICKEN_default_toplevel) in the
constructor, and many other variations of this, but a segmentation
fault occurs in all cases. I am using Chicken 2.3. Has anyone had a
recent experience with embedding Chicken in a C or C++ program? My
code is attached to this message, if anyone is interested in looking
at it. I appreciate all and any help.
-Ivan
chicken_plugin.cpp
Description: Text Data
chicken_plugin.h
Description: Text Data
--
"In those days spirits were brave, the stakes were high, men were real
men, women were real women and small furry creatures from Alpha
Centauri were real small furry creatures from Alpha Centauri."
--Douglas Adams, HHG
- [Chicken-users] Embedding Chicken in C++,
Ivan Raikov <=