AFAIK there's people who have successfully compiled Gambit on both platforms you mention, and documented it quite well in on the ML. I don't know exactly though.

When you dug out the answer to your question, would you be interested to publish your results here?

I suppose your question is how to sucessfully do (compile-file) i.e. gcc gambit-made C files, and gsc -exe / link object files to an executable, all this done outside of the xcode programming environment.

To search on the ML, add " site:https://mercure.iro.umontreal.ca/pipermail/gambit-list/" to your search engine query.

Kind regards

2010/12/22 mikel evins <mevins@me.com>
A little more information, as I attempt to unravel the reasons for build failures with Gambit on Mac OS X and iOS:

I figured I'd eliminate as many variables as possible by reproducing verbatim the examples in the Gambit 4.6.0 manual (pp 14-17).

I created the source files used in the examples (m1.c, m2.scm, m3.scm), and compiled and linked using the example commands from those pages. Building the executable worked just fine (once I added -L/usr/local/gambit/MacOSX/lib so that gsc could find libgambc).

I was not so lucky when I tried the "Building a loadable library" example on page 16:

cairagor:gambit_fun mikel$ gcc -L/usr/local/gambit/MacOSX/lib -bundle m1.o m2.o m3.o foo.o1.o -o foo.o1 -lgambc
ld: duplicate symbol ____G_cons in /usr/local/gambit/MacOSX/lib/libgambc.a(_gambc.o) and foo.o1.o


Perhaps the latest Apple GCC needs additional args? Or perhaps Gambit or its configuration has changed so that additional flags are needed?

--me

_______________________________________________
Gambit-list mailing list
Gambit-list@iro.umontreal.ca
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list