AnsweredAssumed Answered

using sprintf causes link to fail

Question asked by Douglas Moore on Jul 26, 2006
Latest reply on Jul 26, 2006 by CompilerGuru
char szTest[16];
sprintf(szTest,"Test\r\n");

Link Error : L1822: Symbol _STORE_FAR_16 in file C:\Program Files\Metrowerks\CodeWarrior CW12_V3.0\lib\HC12c\lib\ansib.lib is undefined
Link Error : L1822: Symbol _STORE_FAR_32 in file C:\Program Files\Metrowerks\CodeWarrior CW12_V3.0\lib\HC12c\lib\ansib.lib is undefined
Link Error : Link failed

The entire project was set up using the wizard. I tried changing from ansib.lib to ansis.lib with the same result. I also tried defining _STORE_FAR_16 using a -D_ANSI_FAR_16 as a linker arg but the linker doesn't recognize the -D_ANSI_FAR_16 and barfs with an invalid command line. What do I need to do in the project to be able to use the ansi library files like sprintf, etc.

Outcomes