From: Steve C. <ste...@mq...> - 2001-03-23 01:01:42
|
I've been working on moving some of my own code to the mac with partial success. I seem to have most things going for the PPC target but have a few remaining errors on the 68K target which block the build. Here's my log of what I did to port the code using Daniel's sample extension as an example. It finishes off with the remaining error messages I'm getting. Any help in diagnosing this would be appreciated. When it works I'll try to turn this into a readable HOWTO document. Steve Attempt 2: based on Daniel's Sample Extension - modified sample extension by moving project files into a subfolder of the sampelextension folder, changed access paths in _all_ projects to match - unpack padgraph in the tcl/tk folder - copy macprojects folder into padgraph, rename project to padgraph.pi - copy MW_ExampleA.pch into MW_padgraph.pch, modify this to uncomment #include <tk.h> and add any defines needed for the build (Codewarrior doesn't support defines in the project/command line). Modify the names of precompile_target near the top to reflect your project name. - copy over exampleA.r which is the resource definition file to padgraph.r and edit to fit your project - copy over exampleA.exp to padgraph.expl, this defines exported symbols, edit to fit your project - open the project file (macprojects/padgraph.pi) - remove the entries under Docs and replace with your own doc files (optional?) - remove the entries under sources and add in your own source files (*.c), say yes to all projects [[ I get a warning that at least one file couldn't be added here, but they look like they were??]] - remove the entries under headers and replace with your own - replace MW_ExampleA.pch, exampleA.r and exampleA.exp with your new versions in "Mac Specific Files" - add TkStub.lib and TkStubCFM68K.lib from Tcl/Tk:Build to the Tcl Library section - remove shlb files from Objects (is this right??) - click build - remove TkStubCFM68K.lib from the PPC project by looking under "Link Order" and similarly remove the TkStub.lib from the C68K project. I guess I shouldn't have added them to these projects in the first place. - click build again - I get: . Warning "ignored: 'exit' in MSL MWRuntimeLibCFM68K previously defined in MSL C.CFM68K.DLL" . ditto for 'abort' . a few undefined references 'floord' 'powd' 'log10d' 'fabsd' . Can't find system include file <Types.r> in padgraph.r - in the project settings for the PPC target, modify: - the ppc target to padgraphPPC.shlb - the prefix file under C/C++ Language to MW_padgraphHeaderPPC - in the PPC PEF section, chagen the fragment name to padgraph - do the same for the 68K target and for the overall target (which merges the two libraries into a FAT one). - build again, same errors - added an explicit reference to the directory containing Types.r and SysTypes.r in the "System Paths" of both PPC and 68K projects. Gets rid of that error. - all errors seem to be in the 68K version, do I need to explicitly include the 68K math library in the project (ie. more than just MathLib?) here's the remaining errors: -------------------------------- Link Warning : ignored: 'exit' in MSL MWRuntimeLibCFM68K Previously defined in MSL C.CFM68K.DLL Link Warning : ignored: 'abort' in MSL MWRuntimeLibCFM68K Previously defined in MSL C.CFM68K.DLL Link Error : padgraph.c: 'fabsd' [XPointer] referenced from 'padgraph_modify' is undefined. Link Error : padgraph.c: 'log10d' [XPointer] referenced from 'padgraph_nicenum' is undefined. Link Error : padgraph.c: 'floord' [XPointer] referenced from 'padgraph_nicenum' is undefined. Link Error : padgraph.c: 'powd' [XPointer] referenced from 'padgraph_nicenum' is undefined. Link Error : padgraph.c: 'floord' [XPointer] referenced from 'padgraph_instancecmd' is undefined. ----------------------------------------------- |