From: Daniel A. S. <da...@us...> - 2001-04-05 22:15:34
|
Charlie, sorry for the delay in answering. There are several errors in your project that cause it to fail. On the mac when building an application, you cannot link against the stub libraries, at least not for Tcl, maybe Tk works, but I doubt it (I must admit I don't know how this works on Windows) the function pointers needed to initialize the tcl stub tables when calling Tcl_InitStubs() can't come out of thin air, they are imported from Tcl.shlb i.e. in an application, you MUST link against Tcl.shlb, otherwise any call to a tcl routine will jump into the void... (does linking against stubs only really work on windows in application code??) the second reason for your crash (even when you link with Tcl.shlb) is that you are not calling Tcl_FindExecutable() before calling Tcl_CreateInterp() this happened to you because your tcl startup is so non-standard, is there a reason you're not calling Tcl_Main? it would do all this work for you, and correctly... it also looks like you're not linking with the correct runtime libraries, you need to link with the MSL shared libraries and MoreFiles.shlb, you also will need to merge these in with the executable. Please have a look at how SimpleTcl or Wish are built on the mac, that will tell you how to link&merge properly, and consider adapting their startup code, see e.g. tclMacAppInit.c you should also check out an updated version of the scriptics sampleextension I put together recently, the projects in there will tell you how to link an extension on the mac http://www.maths.mq.edu.au/~steffen/tcltk/Mac_sampleextension-0.2.1.bin you also might want to consult the tcl-mac list archives, I've posted a number of times recently on build issues http://www.geocrawler.com/redir-sf.php3?list=tcl-mac Hope this helps Cheers, Daniel At 15:10 -0700 on 3/4/01, Charlie Fenton wrote: >Dear Mr. Steffen, > >I apologize for bothering you with this. If you can refer me to a >more appropriate source of information, that would be great. > >I am the programmer who did the Mac port of the SETI@home client / >screensaver, and am now working with United Devices to develop a >distributed computing client for cancer research and other >applications. > >We are using Tcl/Tk to provide a cross-platform GUI. I have been >having some problems porting code which runs fine on Windows to the >Mac. > >In particular, I have 2 problems: > >(1) linking with the stub libraries TclStub.lib and TkStub.lib does >not satisfy the CW Pro 6 linker. It only links if I include the >Tcl8.3.shlb and Tk8.3.shlb in the project. > >(2) The call to Tcl_CreateInterp() gets an unmapped memory >exception, apparently in MW_MSL.PPC.Shlb. > >I have created a minimal CW Pro6 project to demonstrate this, and >included it, along with my stub libraries. (I have the link problem >both with the original stub libraries included with the full install >and with ones I built using the TclLibraries project). > >I got the Tcl/Tk package using the "TclTk 8.3.2p1 Full Installer" >dated 12/15/00. > >I would be very grateful for any advice you can offer. Thank you >for taking the time to look at this. > >Cheers, >--Charlie >Attachment converted: Classic:Tcl/Tk Test.sit (SIT5/SIT!) (00042AF6) >-- >Charlie Fenton cf...@cf... -- ** Daniel A. Steffen ** ** <mailto:da...@us...> ** |