Content originally posted in LPCWare by trryt on Sat May 01 09:56:12 MST 2010
Today I wanted to do two easy things, which in C wouldn't make any problems anywhere else, but in LPCXpresso they did.
First I needed some sinus values, so I included math.h used sin() and got error on Build:
:/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':
_sincos.c:(.text._sincos+0x1f0): undefined reference to `errno'
collect2: ld returned 1 exit status
And in Problems tab:
Description Resource Path Location Type
make: *** [blinky.axf] Error 1 blinky line 0 C/C++ Problem
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().