Content originally posted in LPCWare by volter on Sat Jul 09 09:41:48 MST 2011 I want to use sinf(); function. I am receiving :Quote: undefined reference to `sinf'Do I need to changed MCU linker from redlib(nohost)? How to fix that?
Content originally posted in LPCWare by CodeRedSupport on Mon Jul 11 03:55:46 MST 2011 Quote: CodeRedSupport
However we have added a few C99 library functions in "Redlib_v2" included in LPCXpresso 4, which IIRC includes sinf(). I'll look into getting the details of the extra functionality added to one of our FAQs in the next few days. Details now added to
In summary, "Redlib_v2" now provides single precision math functions, such as sinf(), plus an implementation of stdbool.h. It also provides an implementation of the (non-standard) itoa() function, which has been asked about on several occasions in the past on this forum.
Content originally posted in LPCWare by volter on Sat Jul 09 12:29:05 MST 2011 Can I install LPCXpresso4 without deleting LPCXpresso3? I'm using OpenSUSE 11.3:cool:
Content originally posted in LPCWare by volter on Sat Jul 09 10:58:32 MST 2011 Quote: Zero Creating a new LPCXpresso4 project (Redlib:nohost) and adding <math.h> was enough to get sin / sinf working :):eek::mad::confused:
Content originally posted in LPCWare by Ex-Zero on Sat Jul 09 10:36:20 MST 2011 Creating a new LPCXpresso4 project (Redlib:nohost) and adding <math.h> was enough to get sin / sinf working :):eek::mad::confused:
Content originally posted in LPCWare by CodeRedSupport on Sat Jul 09 10:32:27 MST 2011 Sinf (single precision version of sin) is not supported in redlib. Redlib is based on c89 whereas sinf was defined in c99.
You can either cast sin to float or use newlib (which is c99, but also quite a bit larger)
Redlib was written as a C90 compliant C library - sinf() is a C99 addition. If you want access to full C99 library support, you will need to switch to Newlib.
However we have added a few C99 library functions in "Redlib_v2" included in LPCXpresso 4, which IIRC includes sinf(). I'll look into getting the details of the extra functionality added to one of our FAQs in the next few days.
I did that. I get errors only on sinf(),cosf(),asinf(),acosf() but not on : sin(),cos() As I now from C those functions defined like : double sin(double angle); float sinf(float angle);