Problem with the math.h standard library

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with the math.h standard library

628 Views
flofa
Contributor II

Hello everybody,

I am working on the MPC5643L using the tool CW10.5.

In one project I have to use some of the functions of the math.h. 

The functions I use are the "floorf" and the "fmodf".

But than compiler produces the following errors:

-undefined: 'floorf' Referenced from 'Simulink_Task_1ms' in WST_c.obj

-undefined: 'fmodf' Referenced from 'Simulink_Task_1ms' in WST_c.obj

I´m not sure what´s wrong, cause I included the math.h in the source file. I also added the ewl-directory into the include directories of the project.

But I seem that the math.h isn´t translated correctly cause of some missing preprocessor macros. For example the macro "_EWL_C99" is missing. And I can´t define them correctly.

Do I have to change another project settings or attach another prefix-file to the project?

Or is it generally possible to use the ewl-libraries with the MPC5643L?

Thanks for your help.

Best regards

Florian.

2 Replies

436 Views
martin_kovar
NXP Employee
NXP Employee

Hello Florian,

I created simple project, but I am not able to reproduce the issue on my side. Could you please create simple example which demonstrates your issue and attach it to this post?

Regards,

Martin

436 Views
flofa
Contributor II

Hi Martin,

thanks for the answer.

I could solve that Issue.

I excluded the "libc_E200z446_VLE_SPFP_Only.a" library from the project. I think the "math.h" is part of that library. And that was the reason why it didn´t work.

After re-including the library it works fine.

Thanks for your help.

 

Best regards

Florian.

0 Kudos