Well I've started chopping out huge section of the code. Basically I
started with nothing and uncommented one line at a time. When I found
the offending line I thought I had it but no luck. It's only a big
list of simple calculations:
float x0, x1, x2, y0, y1, y2, z0, z1, z2;
long xa, xb, xc, ya, yb, yc, za, zb, zc;
long aa, ab, ac, ba, bb, bc, ca, cb, cc;
long xi, yi, zi;
x -= xi;
y -= yi;
z -= zi;
x1 = x * x;
y1 = y * y;
z1 = z * z;
x2 = 0.5 * x1;
y2 = 0.5 * y1;
z2 = 0.5 * z1;
x1 = 0.5 + x - x1;
y1 = 0.5 + y - y1;
z1 = 0.5 + z - z1;
x0 = 0.5 - x + x2;
It seems like its related to how many lines of code I've got. This is
such a pain in the permanent vertical smile. I'm trying to convert
projects to XCode and everybody's procedures suck. They totally omit
the critical #define __CF_USE_FRAMEWORK_INCLUDES__ prefix line which I
just happened to find in the CW release notes. Now this garbage.
*Sigh* where is MW Ron when you need him?
RogueWarrior - 04 Jul 2006 04:02 GMT
Well, I figured it out. There are a whole bunch of restore_fpr
routines defined in runtime.c which is part of the Mac OSX Support MSL
libraries. However for some reason it's not enough to just add it to
the project. I got compile errors. But if I took the MSL Runtime
project, copied it, and removed everything but runtime.c, compiled a
new library, added that to my project, it compiles, links and runs no
problem. YAY!
Now to see if the damn thing works in XCode.
Paul - 05 Jul 2006 16:28 GMT
> Well I've started chopping out huge section of the code. Basically I
> started with nothing and uncommented one line at a time. When I found
[quoted text clipped - 30 lines]
> just happened to find in the CW release notes. Now this garbage.
> *Sigh* where is MW Ron when you need him?
Not how many lines of code, how many fp registers it uses. MW supplied these
functions to save and restore nonvolatile registers in a function call. The
runtime library is trying to do that and not finding the function it needs.
A different compiler might even do it internally (generate the load/save
code itself) and not need a canned solution, though it would likely generate
a larger program by effectively inlining it.