On Sat, Dec 18, 2004 at 04:50:35PM -0500, Albert Cahalan wrote: > 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) I was slightly hasty! It was only an issue in three or four functions and not critical at all, but it _was_ relying on rounding down instead of the default rounding nearest. And you're right about being able to set it. Will have a play with this later.
I finally got to compile 'tuxpaint.c' with the MS C/C++ 13.10.3077 compiler and it *still* wouldn't accept the mixed definitions/code in a block when used as a C compiler - Argh! And I couldn't get the integrated debugger to work either, which would pretty much negate my reasons for sticking with Visual Studio. Trying the (evaluation) Intel compiler next ... cheers, John. > > > _______________________________________________ > Tuxpaint-dev mailing list > [EMAIL PROTECTED] > http://tux4kids.net/mailman/listinfo/tuxpaint-dev _______________________________________________ Tuxpaint-dev mailing list [EMAIL PROTECTED] http://tux4kids.net/mailman/listinfo/tuxpaint-dev