On Sat, 2004-12-18 at 16:31, John Popplewell wrote: > On Sat, Dec 18, 2004 at 11:58:24AM -0500, Albert Cahalan wrote: > > On Sat, 2004-12-18 at 11:37, John Popplewell wrote:
> > > but I can't get it to _link_. From reading around, to build Windows > > > applications, it seems to need some bits from the platform SDK which is > > > 320M or the .NET SDK which I seem to remember swearing never to touch. > Actually, I managed to get it to link in release mode by suppressing > calls to _ftol which were generating link errors. Sadly, the code didn't > work correctly anymore :-( Something to do with the FIST instruction and > FPU rounding modes when truncating. A well documented can of worms. Go ahead and set the FPU rounding mode to either "toward infinity" or "toward zero" as desired. This will help with float-to-integer conversions, while not causing serious errors for other math. The error would be well under 1 ppm for regular float math. Then, if the compiler can be set to directly use the right instructions, you're all set. Otherwise, you need to make a _ftol() function with some assembly. (either inline, or in a *.asm file) _______________________________________________ Tuxpaint-dev mailing list [EMAIL PROTECTED] http://tux4kids.net/mailman/listinfo/tuxpaint-dev