Hello. Several days ago, I posted the next message in Google scheme group.

"Hello.

Nowadays, I'm trying to make ipod touch toy applications. When I write
object-c or c code, I can't help miss macro and repl of lisp. As the
subject, I hope that I develop core functions with lisp (e.g. In game
application, they will be artificial intelligence parts), and make
them into c dynamic or static libraries. If cocoa touch application
can use shared libraries, object-c will be need in only GUI and
controller parts. Is it possible?

If it is possible, is there implementation which generate c libraries?
I looked around ECL, bigloo, and some other lisps, but I couldn't find
how to export symbols of var and function to external C and generate a
library rather than make standalone executable. Would you recommend a
good implementation(generate small binaries as possible, good
documentation...) for it?

Regards."

And Mark answered me like below, so I tried to find how to build gambit code for iPhone application in Xcode.

"Yes, with Gambit.  See: https://webmail.iro.umontreal.ca/pipermail/gambit-list/2008-January/0... "

I went to the blog (http://weblog.latte.ca/blake/tech/iTouch/languages.html), and try to find how he makes it. But I didn't find any hint.

And I read the manual of Gambit and searched in all Gambit list archives for examples of C interoperation. Shamely, because I don't know much about gcc build process and options, I can't figure out how I can apply them into Xcode build process. So I decided to try it in every way.

First, I asserted that my mac can generates an executable.

bash-3.2$ gsc -c m2.scm
bash-3.2$ gsc -c m3.scm
bash-3.2$ gsc -link m2.c m3.c
bash-3.2$ gcc m1.c m2.c m3.c m3_.c -I/usr/local/Gambit-C/current/
include -L/usr/local/Gambit-C/current/lib -lgambc
bash-3.2$ ./a.out
((2 . 2) (4 . 4) (8 . 8) (16 . 16))

Next, I tried to compile "tests/server.scm" example in Xcode iPhone application project. Because I didn't know hot it goes, I added all files in "/usr/local/Gambit-C/current/include" and "usr/local/Gambit-C/current/lib" into Xcode project. And I copied generated c files and server.h file except client.c into Xcode project. I tried next combinations.

all .a files in usr/local/Gambit-C/current/lib + Gambit.h + generated "server.c" by "gsc -c server.scm" + server.h copied into Xcode project, and "Build and Go"
all .a files in usr/local/Gambit-C/current/lib + Gambit.h + generated "server.c", "server_.c" by "gsc -link -flat server.scm" + server.h copied into Xcode project, and "Build and Go"
all files in usr/local/Gambit-C/current/lib + Gambit.h + generated "server.c" by "gsc -c server.scm" + server.h copied into Xcode project, and "Build and Go"
all files in usr/local/Gambit-C/current/lib + Gambit.h + generated "server.c", "server_.c" by "gsc -link -flat server.scm" + server.h copied into Xcode project, and "Build and Go"

All they failed. I know I look stupid. ^_^;; Could I get some help if there is anyone who have built Gambit code in Xcode with c or object-c files? Thanks in advance.