<?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 CodeWarrior 8- &amp; 16-bit tools: Linker errors in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-8-16-bit-tools-Linker-errors/m-p/124966#M140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;To help you find solutions to problems that have already been solved, we have posted this message. It contains an entire topic ported from a separate forum. The original message and all replies are in this single message.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Posted: Jul 26, 2004 - 06:06 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;hi,&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am working with CodeWarrior Development Studio for HC(S)08 Microcontrollers v3.0 special edition free license.&lt;/P&gt;&lt;P&gt;When I do a float multiplication seems there are undefined symbols in ansi.lib and I'll receive these messages :&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;'LINKER ERROR 1822: symbol _DUFLOAT ...'&lt;BR /&gt;'LINKER ERROR 1822: symbol _DMUL_RC ...'&lt;BR /&gt;'LINKER ERROR 1822: symbol _DSTRUNC ...'&lt;/P&gt;&lt;P&gt;/*this sentence provokes the error linker */&lt;BR /&gt;dummy=(unsigned int)((rad.volum*0.1)*0x7fff);&lt;/P&gt;&lt;P&gt;rad.volum is a unsigned char type&lt;/P&gt;&lt;P&gt;How can I solve this problem?.&lt;/P&gt;&lt;P&gt;thanks in advanced.&lt;/P&gt;&lt;P&gt;RJIMENEZ&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Posted: Jul 27, 2004 - 04:37 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;It looks like the ANSI library is not part of your project.&lt;BR /&gt;I would need to get access to the whole project to investigate that forward.&lt;/P&gt;&lt;P&gt;mw_cbezy&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Posted: Jul 27, 2004 - 05:41 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I don't discover how attach a file (my CW project) yet in this environment. Anyway if you use a wizard to make a new project choose MC68HC908SR12 chip and the followings settings as defaults, substitute the main code for this one:&lt;/P&gt;&lt;P&gt;#define VARINT_BY_FLOAT&lt;BR /&gt;//#define VARUCHAR_BY_FLOAT&lt;BR /&gt;//#define NUM_BY_FLOAT&lt;/P&gt;&lt;P&gt;#ifndef VARUCHAR_BY_FLOAT&lt;BR /&gt;#ifndef VARINT_BY_FLOAT&lt;BR /&gt;#define INT_BY_FLOAT&lt;BR /&gt;#endif&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;unsigned int dummy;&lt;BR /&gt;unsigned char volum;&lt;BR /&gt;unsigned int value;&lt;/P&gt;&lt;P&gt;EnableInterrupts; /* enable interrupts */&lt;BR /&gt;/* include your code here */&lt;/P&gt;&lt;P&gt;volum=50;&lt;BR /&gt;value=50;&lt;/P&gt;&lt;P&gt;#ifdef NUM_BY_FLOAT&lt;BR /&gt;/* this sentence work fine */&lt;BR /&gt;dummy=(unsigned int)((50*0.1)*0x7FFF);&lt;BR /&gt;#else&lt;BR /&gt;#ifdef VARINT_BY_FLOAT&lt;BR /&gt;/*this sentence provokes the error linker */&lt;BR /&gt;dummy=(unsigned int)((value*0.1)*0x7FFF);&lt;BR /&gt;#else&lt;BR /&gt;/*this sentence provokes the error linker */&lt;BR /&gt;dummy=(unsigned int)((volum*0.1)*0x7FFF);&lt;BR /&gt;#endif&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;for(; {&lt;BR /&gt;__RESET_WATCHDOG(); /* kicks the dog */&lt;BR /&gt;} /* loop forever */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It seems that there are undefined symbols in the ANSI lib, it looks like the definitions exist but no the associate code function.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Rafa.&amp;nbsp;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Posted: Jul 27, 2004 - 09:13 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;When creating the project with the wizard, did you specify you want to use floating point arithmetic?&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is the question asked on page 5.&lt;/P&gt;&lt;P&gt;If you are not sure, check which ansi library is inserted in the project. If you get ansii.lib or ansiti.lib, you have linked the library without floating point support.&lt;/P&gt;&lt;P&gt;mw_cbezy&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Jan 2006 02:19:39 GMT</pubDate>
    <dc:creator>marc_paquette</dc:creator>
    <dc:date>2006-01-28T02:19:39Z</dc:date>
    <item>
      <title>CodeWarrior 8- &amp; 16-bit tools: Linker errors</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-8-16-bit-tools-Linker-errors/m-p/124966#M140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ff0000;"&gt;To help you find solutions to problems that have already been solved, we have posted this message. It contains an entire topic ported from a separate forum. The original message and all replies are in this single message.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Posted: Jul 26, 2004 - 06:06 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;hi,&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am working with CodeWarrior Development Studio for HC(S)08 Microcontrollers v3.0 special edition free license.&lt;/P&gt;&lt;P&gt;When I do a float multiplication seems there are undefined symbols in ansi.lib and I'll receive these messages :&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;'LINKER ERROR 1822: symbol _DUFLOAT ...'&lt;BR /&gt;'LINKER ERROR 1822: symbol _DMUL_RC ...'&lt;BR /&gt;'LINKER ERROR 1822: symbol _DSTRUNC ...'&lt;/P&gt;&lt;P&gt;/*this sentence provokes the error linker */&lt;BR /&gt;dummy=(unsigned int)((rad.volum*0.1)*0x7fff);&lt;/P&gt;&lt;P&gt;rad.volum is a unsigned char type&lt;/P&gt;&lt;P&gt;How can I solve this problem?.&lt;/P&gt;&lt;P&gt;thanks in advanced.&lt;/P&gt;&lt;P&gt;RJIMENEZ&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Posted: Jul 27, 2004 - 04:37 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;It looks like the ANSI library is not part of your project.&lt;BR /&gt;I would need to get access to the whole project to investigate that forward.&lt;/P&gt;&lt;P&gt;mw_cbezy&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Posted: Jul 27, 2004 - 05:41 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I don't discover how attach a file (my CW project) yet in this environment. Anyway if you use a wizard to make a new project choose MC68HC908SR12 chip and the followings settings as defaults, substitute the main code for this one:&lt;/P&gt;&lt;P&gt;#define VARINT_BY_FLOAT&lt;BR /&gt;//#define VARUCHAR_BY_FLOAT&lt;BR /&gt;//#define NUM_BY_FLOAT&lt;/P&gt;&lt;P&gt;#ifndef VARUCHAR_BY_FLOAT&lt;BR /&gt;#ifndef VARINT_BY_FLOAT&lt;BR /&gt;#define INT_BY_FLOAT&lt;BR /&gt;#endif&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;unsigned int dummy;&lt;BR /&gt;unsigned char volum;&lt;BR /&gt;unsigned int value;&lt;/P&gt;&lt;P&gt;EnableInterrupts; /* enable interrupts */&lt;BR /&gt;/* include your code here */&lt;/P&gt;&lt;P&gt;volum=50;&lt;BR /&gt;value=50;&lt;/P&gt;&lt;P&gt;#ifdef NUM_BY_FLOAT&lt;BR /&gt;/* this sentence work fine */&lt;BR /&gt;dummy=(unsigned int)((50*0.1)*0x7FFF);&lt;BR /&gt;#else&lt;BR /&gt;#ifdef VARINT_BY_FLOAT&lt;BR /&gt;/*this sentence provokes the error linker */&lt;BR /&gt;dummy=(unsigned int)((value*0.1)*0x7FFF);&lt;BR /&gt;#else&lt;BR /&gt;/*this sentence provokes the error linker */&lt;BR /&gt;dummy=(unsigned int)((volum*0.1)*0x7FFF);&lt;BR /&gt;#endif&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;for(; {&lt;BR /&gt;__RESET_WATCHDOG(); /* kicks the dog */&lt;BR /&gt;} /* loop forever */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It seems that there are undefined symbols in the ANSI lib, it looks like the definitions exist but no the associate code function.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Rafa.&amp;nbsp;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Posted: Jul 27, 2004 - 09:13 AM&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;When creating the project with the wizard, did you specify you want to use floating point arithmetic?&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This is the question asked on page 5.&lt;/P&gt;&lt;P&gt;If you are not sure, check which ansi library is inserted in the project. If you get ansii.lib or ansiti.lib, you have linked the library without floating point support.&lt;/P&gt;&lt;P&gt;mw_cbezy&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2006 02:19:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CodeWarrior-8-16-bit-tools-Linker-errors/m-p/124966#M140</guid>
      <dc:creator>marc_paquette</dc:creator>
      <dc:date>2006-01-28T02:19:39Z</dc:date>
    </item>
  </channel>
</rss>

