Aha, I get your question.<div><br></div><div>This is not my field of expertise. Generally I'd try to debug it from an as basic approach as possible.</div><div><br></div><div>Look at the error message you got - </div><div>
<br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">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<br>
ld: duplicate symbol ____G_cons in /usr/local/gambit/MacOSX/lib/libgambc.a(_gambc.o) and foo.o1.o</span></blockquote><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">the compiler complains cons is duplicate. That's a runtime library function, afaik. Perhaps gcc somehow tries to link more than one variant/version of the runtime library object file (*gambc*.o/.a) at the same time? What files do you have in </span></font><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">/usr/local/gambit/MacOSX/lib?</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">What are all the symbols defined/exported by the involved object files?</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Brgds</span></font></div>
<div><br><div class="gmail_quote">2010/12/22 mikel evins <span dir="ltr"><<a href="mailto:mevins@me.com">mevins@me.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Dec 22, 2010, at 4:48 AM, Mikael wrote:<br>
<br>
> 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.<br>
<br>
</div>Quite so. I'm one of them.<br>
<div class="im"><br>
> When you dug out the answer to your question, would you be interested to publish your results here?<br>
><br>
> 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.<br>
<br>
</div><div class="im">No, that's not my question.<br>
<br>
</div>My question is why, when I follow the example given in the Gambit manual letter-for-letter, the build fails with a "duplicate symbol" error. Do other people who follow that example exactly on recent versions of Mac OS X with recent versions of Apple dev tools see the same error? If so, then presumably something in a recent Gambit or Apple release has introduced a build problem. If not, then presumably some quirk of my local configuration is causing a link problem.<br>

<br>
The only obvious idiosyncrasy of my build environment is that instead of building and installing Gambit in the normal way, I built it from recent Gambit sources using a config script that Marc provided for the purpose of simultaneously building Gambit for three environments: Mac OS X, the iOS Simulator, and iOS devices. Consequently, I have three parallel installs of Gambit, and I must, of course, pass suitable -I and -L flags when building, so that Gambit finds the right files.<br>

<br>
None of this makes it obvious to me why following the instructions on page 16 of the manual (while of course adding the appropriate -L to find the right gambit library) would result in a "duplicate symbol" error, but it's certainly possible that I overlooked something.<br>

<font color="#888888"><br>
--me<br>
<br>
</font></blockquote></div><br></div>