[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
maybe I misunderestood something...
Hello people, it's me again.
As I wrote, I need to embed an MzScheme interpreter into my application.
First of all, I found "Embedding MzScheme into a Program" chapter of
"Inside PLT MzScheme" manual. I did everythig as described in that
chapter, but when I tried to link my embedding object against those .a
libraries, I got this:
step 1: I make test.c with the code from chapter's example.
step 2: $ gcc -I/usr/local/drscheme/collects/mzscheme/include -c test.c
everything's OK so far.
STEP 3: $ gcc -o test -L/usr/local/drscheme/collects/mzscheme/lib/i386-freebsd -lgc -lmzscheme test.o
test.o: In function `main':
test.o(.text+0x7): undefined reference to `scheme_basic_env'
test.o(.text+0x11): undefined reference to `scheme_current_process'
test.o(.text+0x3c): undefined reference to `scheme_current_process'
test.o(.text+0x75): undefined reference to `scheme_eval_string'
test.o(.text+0x8d): undefined reference to `scheme_display'
test.o(.text+0x9c): undefined reference to `scheme_char_constants'
test.o(.text+0xa7): undefined reference to `scheme_display'
Why? What have I forgotten?
Next. I have also found a chapter how to build a "standalone executable
from native code", but the case described there differs fro mine. All I
want to do is:
1. Make a c-coded app with embedded interpreter;
2. Make an *.ss file(s) containing scheme callbacks to events generated by
c code;
3. On runtime main app should take *.ss file(s), parse (and probably
byte-compile) them and
4. Execute scheme callbacks when needed by c-events.
The question is whether I can do this with MzScheme. The next question is
HOW, because the first example doesn't work and the second one requires
compiling scheme *.ss and link them into the main app -- the way I don't
need.
--
Yours truely, WBR, Paul Argentoff.