<?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>CodeWarrior for MCU中的主题 Re: CW 10.6 Kinetis - &amp;quot;incompatible implicit declaration&amp;quot; of all math.h functions?</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-10-6-Kinetis-quot-incompatible-implicit-declaration-quot-of/m-p/350618#M11237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've performed some tests on my side with a Hello project wizard example based on MCU v10.6 + MQX V4.1.1.&lt;/P&gt;&lt;P&gt;The math.h as other libraries are defined in the EWL lib.&lt;/P&gt;&lt;P&gt;By default the MQX project is using/including the EWL library but the options below is not selected..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - this is the cause of the warning -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact if you include the #include &amp;lt;math.h&amp;gt;, the function fabs() for instance will not be resolved if the EWL is not enabled.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/46392i96FBE7506E16F3E9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this option will add a command line instruction when the compiler is called: -specs=ewl_c_hosted.specs (in this configuration).&lt;/P&gt;&lt;P&gt;Now the math.h file will be really used to solve the math functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working for my example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Pascal Irrle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Oct 2014 13:02:13 GMT</pubDate>
    <dc:creator>trytohelp</dc:creator>
    <dc:date>2014-10-03T13:02:13Z</dc:date>
    <item>
      <title>CW 10.6 Kinetis - "incompatible implicit declaration" of all math.h functions?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-10-6-Kinetis-quot-incompatible-implicit-declaration-quot-of/m-p/350616#M11235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've run into this previously on an earlier project, but it was easy to patch over because there was exactly one math reference.&amp;nbsp; This project is chock full of them, so I need to nip this in the bud.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quite simply, it seems that #include &amp;lt;math.h&amp;gt; isn't doing any good, because the compiler isn't seeing any prototypes, and I'm getting a ton of messages like this:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;../Sources/CalcLib/calcDenVisc.c: In function 'calcViscosity'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcDenVisc.c:81:9: warning: implicit declaration of function 'exp' [-Wimplicit-function-declaration]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcDenVisc.c: In function 'calcDensity':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcDenVisc.c:169:9: warning: implicit declaration of function 'pow' [-Wimplicit-function-declaration]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcDenVisc.c:176:9: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcDenVisc.c:200:19: warning: incompatible implicit declaration of built-in function 'pow' [enabled by default]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcFlow.c: In function 'calcFlow':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcFlow.c:59:9: warning: implicit declaration of function 'fabs' [-Wimplicit-function-declaration]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcFlow.c:155:7: warning: incompatible implicit declaration of built-in function 'fabs' [enabled by default]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcFlow.c: In function 'updateHiResTot':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcFlow.c:233:7: warning: incompatible implicit declaration of built-in function 'fabs' [enabled by default]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcSupport.c: In function 'calcHdlr_doCalcStep':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;../Sources/CalcLib/calcSupport.c:249:17: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;../Sources/CalcLib/calcSupport.c:258:17: warning: implicit declaration of function 'fabs' [-Wimplicit-function-declaration]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running CW for MCU 10.6, with MQX v4.1.1 (had this issue with an MQX 4.0 project, too), compiling for a K20 120MHz target.&amp;nbsp; This is the only system library that I seem to have issues with.&amp;nbsp; Is there some special preprocessor define that I need to set in my project?&amp;nbsp; (I have _EWL_C99=1 and __VFPV4__=1 defined in the preprocessor.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 15:47:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-10-6-Kinetis-quot-incompatible-implicit-declaration-quot-of/m-p/350616#M11235</guid>
      <dc:creator>dmarks_ls</dc:creator>
      <dc:date>2014-09-26T15:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: CW 10.6 Kinetis - "incompatible implicit declaration" of all math.h functions?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-10-6-Kinetis-quot-incompatible-implicit-declaration-quot-of/m-p/350617#M11236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will contact MQX colleague.&lt;/P&gt;&lt;P&gt;Keep you informed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Pascal Irrle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Oct 2014 09:58:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-10-6-Kinetis-quot-incompatible-implicit-declaration-quot-of/m-p/350617#M11236</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-10-03T09:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: CW 10.6 Kinetis - "incompatible implicit declaration" of all math.h functions?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-10-6-Kinetis-quot-incompatible-implicit-declaration-quot-of/m-p/350618#M11237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've performed some tests on my side with a Hello project wizard example based on MCU v10.6 + MQX V4.1.1.&lt;/P&gt;&lt;P&gt;The math.h as other libraries are defined in the EWL lib.&lt;/P&gt;&lt;P&gt;By default the MQX project is using/including the EWL library but the options below is not selected..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - this is the cause of the warning -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact if you include the #include &amp;lt;math.h&amp;gt;, the function fabs() for instance will not be resolved if the EWL is not enabled.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/46392i96FBE7506E16F3E9/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this option will add a command line instruction when the compiler is called: -specs=ewl_c_hosted.specs (in this configuration).&lt;/P&gt;&lt;P&gt;Now the math.h file will be really used to solve the math functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working for my example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Pascal Irrle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Oct 2014 13:02:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-10-6-Kinetis-quot-incompatible-implicit-declaration-quot-of/m-p/350618#M11237</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-10-03T13:02:13Z</dc:date>
    </item>
  </channel>
</rss>

