<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: using sprintf causes link to fail in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/using-sprintf-causes-link-to-fail/m-p/125032#M165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Those functions are defined in datapage.c, usually this file is added by the wizard as well. So you just need to add this file to your project, it is located in lib\hc12c\src.&lt;BR /&gt;&lt;BR /&gt;Also note that HC12 V4.5's sprintf does not use _STORE_FAR_16 in its default configuration (I think there is a libdefs.h option). Not sure, but can be that previous versions of sprintf did reference it.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jul 2006 03:03:09 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2006-07-27T03:03:09Z</dc:date>
    <item>
      <title>using sprintf causes link to fail</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/using-sprintf-causes-link-to-fail/m-p/125031#M164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;char szTest[16];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sprintf(szTest,"Test\r\n");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Link Error : L1822: Symbol _STORE_FAR_16 in file C:\Program Files\Metrowerks\CodeWarrior CW12_V3.0\lib\HC12c\lib\ansib.lib is undefined&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Link Error : L1822: Symbol _STORE_FAR_32 in file C:\Program Files\Metrowerks\CodeWarrior CW12_V3.0\lib\HC12c\lib\ansib.lib is undefined&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Link Error : Link failed&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 00:58:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/using-sprintf-causes-link-to-fail/m-p/125031#M164</guid>
      <dc:creator>dougm</dc:creator>
      <dc:date>2006-07-27T00:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: using sprintf causes link to fail</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/using-sprintf-causes-link-to-fail/m-p/125032#M165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Those functions are defined in datapage.c, usually this file is added by the wizard as well. So you just need to add this file to your project, it is located in lib\hc12c\src.&lt;BR /&gt;&lt;BR /&gt;Also note that HC12 V4.5's sprintf does not use _STORE_FAR_16 in its default configuration (I think there is a libdefs.h option). Not sure, but can be that previous versions of sprintf did reference it.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 03:03:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/using-sprintf-causes-link-to-fail/m-p/125032#M165</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2006-07-27T03:03:09Z</dc:date>
    </item>
  </channel>
</rss>

