Why would floating-point operations in my MetaWINDOW application using Phar Lap TNT cause my program to crash?
ANSWER When linking a Phar Lap TNT MetaWINDOW application that includes floating-point operations you must explicity specify the order for the MetaWINDOW data segment for it to link properly. The problem appears that the MetaWINDOW data segment GRAFIX_DATA is being overwritten upon load when the floating point runtime code is also linked in. From the link map there is no evidence that this is happening. The starts and length of each segment show up as fine. When debugging however, prior to any MetaWINDOW calls, if the GRAFIX_DATA segment is dumped, it is corrupted about 2/3 of the way into it. It is unclear why, but if you tell the linker to link the MetaWINDOW data segment first, then it loads ok. To correctly load the MetaWINDOW data segment, modify the Phar Lap response file MSVC32.DOS or MSVC32.
ANSWER When linking a Phar Lap TNT MetaWINDOW application that includes floating-point operations you must explicity specify the order for the MetaWINDOW data segment for it to link properly. The problem appears that the MetaWINDOW data segment GRAFIX_DATA is being overwritten upon load when the floating point runtime code is also linked in. From the link map there is no evidence that this is happening. The starts and length of each segment show up as fine. When debugging however, prior to any MetaWINDOW calls, if the GRAFIX_DATA segment is dumped, it is corrupted about 2/3 of the way into it. It is unclear why, but if you tell the linker to link the MetaWINDOW data segment first, then it loads ok.
Related Questions
- Why when I build my MetaWINDOW Phar Lap TNT library is the library size different from that of the product release library MET_XT3D.LIB?
- Why would floating-point operations in my MetaWINDOW application using Phar Lap TNT cause my program to crash?
- Source Code - What tools do I need to build the MetaWINDOW library for Phar Lap TNT, MET_XT3D.LIB?