<?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>LPCXpresso IDEのトピックProblem with sin() and random()</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561878#M16495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by trryt on Sat May 01 09:56:12 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Today I wanted to do two easy things, which in C wouldn't make any problems anywhere else, but in LPCXpresso they did.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First I needed some sinus values, so I included math.h used sin() and got error on Build:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;:/nxp/lpcxpresso_3.2/tools/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a(_sincos.o): In function `_sincos':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_sincos.c:(.text._sincos+0x1f0): undefined reference to `errno'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;collect2: ld returned 1 exit status&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And in Problems tab:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Resource&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;make: *** [blinky.axf] Error 1&amp;nbsp;&amp;nbsp;&amp;nbsp; blinky&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line 0&amp;nbsp;&amp;nbsp;&amp;nbsp; C/C++ Problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, I needed some random values, so I included stdlib.h and there was no random() function there, it fought it is obvious in C implementation that there has to be this function there. So the questions are, what I have to do to use sin() and where can I find random().&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:12:11 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:12:11Z</dc:date>
    <item>
      <title>Problem with sin() and random()</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561878#M16495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by trryt on Sat May 01 09:56:12 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Today I wanted to do two easy things, which in C wouldn't make any problems anywhere else, but in LPCXpresso they did.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First I needed some sinus values, so I included math.h used sin() and got error on Build:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;:/nxp/lpcxpresso_3.2/tools/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a(_sincos.o): In function `_sincos':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_sincos.c:(.text._sincos+0x1f0): undefined reference to `errno'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;collect2: ld returned 1 exit status&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And in Problems tab:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Resource&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp; Type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;make: *** [blinky.axf] Error 1&amp;nbsp;&amp;nbsp;&amp;nbsp; blinky&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line 0&amp;nbsp;&amp;nbsp;&amp;nbsp; C/C++ Problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, I needed some random values, so I included stdlib.h and there was no random() function there, it fought it is obvious in C implementation that there has to be this function there. So the questions are, what I have to do to use sin() and where can I find random().&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:12:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561878#M16495</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sin() and random()</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561879#M16496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by whitecoe on Sat May 01 13:18:47 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: trryt&lt;/STRONG&gt;&lt;BR /&gt;:/nxp/lpcxpresso_3.2/tools/bin/../lib/gcc/arm-none-eabi/4.3.3/../../../../arm-none-eabi/lib/armv6-m\libcr_c.a(_sincos.o): In function `_sincos':&lt;BR /&gt;_sincos.c:(.text._sincos+0x1f0): undefined reference to `errno'&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a look at this...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://knowledgebase.nxp.com/showthread.php?p=955&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:12:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561879#M16496</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sin() and random()</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561880#M16497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by trryt on Sat May 01 15:50:45 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much! Changing from Redlib (none) to Redlib (nohost) fixed the sin() problem. I hoped that changing C libs may bring random to its place but it's still missing..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:12:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561880#M16497</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sin() and random()</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561881#M16498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by igorsk on Sun May 02 01:50:30 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: trryt&lt;/STRONG&gt;&lt;BR /&gt;I hoped that changing C libs may bring random to its place but it's still missing..&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try using &lt;/SPAN&gt;&lt;A href="http://http://www.cplusplus.com/reference/clibrary/cstdlib/rand/"&gt;rand()&lt;/A&gt;&lt;SPAN&gt; instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:12:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561881#M16498</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sin() and random()</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561882#M16499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Mon May 03 00:32:23 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;random() is not a standard C function - use rand() instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:12:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Problem-with-sin-and-random/m-p/561882#M16499</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:12:13Z</dc:date>
    </item>
  </channel>
</rss>

