[plt-scheme] embedding MzScheme with Carbon ?
John,
Thanks for the encouragement. While tied to Carbon, my app only has to run under OS X.
I tried embedding both the v103 and v206 version of mzScheme, but no luck. It compiles and links, but crashes.
I was able to embed it easily on Windows into a little test application and am just attempting to port this test to the Mac, but without any luck.
Between v103 and v206 I have to think that my mzScheme and GC libraries are correct, perhaps the problem lies with how it is embedded. I've followed the instructions from the documentation, and discovered other hints through web searches of this mailing list.
But do you, or anyone, perhaps have specific advice embedding for MzScheme on the Mac?
Thanks,
Chris Perkins
At 06:58 AM 1/30/2004, you wrote:
> On Jan 29, 2004, at 8:16 PM, Chris Perkins wrote:
>
>>I have a Carbon application and a Carbon shared library into which I would like to embed MzScheme. But, so far it keeps crashing.
>>
>>It seems like PLT Scheme sort of moved straight from OS 9 to OS X without going Carbon in between. That was very smart, but the decision about Carbon is not mine to make.
>>
>>I'm using PLTv206 and have made a Carbon library from the MzScheme GC and Scheme sources, removing the TCP/IP stuff. This builds fine, but after I link against it, my app crashes in the GC deep under the call to scheme_basic_env.
>>
>>I've tried the Senora GC, I've tried calling scheme_init_stack_check(), and scheme_set_stack_base() before scheme_basic_env, and I've tried rebuilding the MzScheme library with several different options.
>>
>>But, as of yet, no luck.
>>
>>I seem to be randomly fishing and I suspect I'm holding the worm in my hand while the pole is in the water.
>>
>>I'm about to try the PLT 100 sources, perhaps I'll have better luck there.
>>
>>
>>But does anyone have any guidance or a MzScheme Carbon library file I can use? Thanks for any and all help.
>
>A little bit of history: MzScheme has been around as a UNIX program far longer than it has been around as a mac program. When OS X came around, we had to decide whether to "carbon-ize" the OS 9 sources or to adapt the UNIX version for OS X. After a good deal of waffling, we decided to make the OS X mzscheme a branch of the UNIX sources. After we stopped supporting OS 9, this drastically reduced the amount of code we had to maintain.
>
>So the question is this: are you writing "pure carbon" apps that have to be able to run on OS 9 as well, or will your application be OS X-only? The way your mail is phrased indicates the former, but if the latter should be the case, then you should be able to embed MzScheme
>libraries, linking them with CodeWarrior.
>
>If you need to run the final product on OS 9, though, I think you'll probably want to drop back to the mac sources from the last bundle that supported OS 9 (203?), rather than adapting the 206 sources. I believe there are a fair number of differences specific to OS 9. Amusingly, I suspect you'll have to chop TCP/IP support out of these sources as well, as I believe they're not Carbon-friendly either.
>
>Hope this helps,
>
>john clements