Cant use float operations

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

Cant use float operations

807 Views
Nanouser
Contributor I

Hi there,

 

i got a problem using HC12 and CW 5.9:

 

i want to multiply two floats:

 

float x = 0.1;

float y = 0.2;

float z = 0.3;

 

z = x *y;

 

if i try to run this i get following error: "L1822: Symbol _FMUL in file X:/XXXX/XXX.c.o is undefined".

 

operations like z = x+y; or z = x-y; are also not possible giving an according error.

 

why is this? how can i fix this problem? simple float multiplications should be possible!

 

i already removed the -D__NO_FLOAT__  parameter from the compiler settings. didn´t work. making a new project also doesn´t work, but i cant see a floating point option anywhere in the wizard anyway.

 

Thanks

 

~nano~

Labels (1)
0 Kudos
Reply
1 Reply

611 Views
CrasyCat
Specialist III

Hello

 

  You did not link the appropriate ANSI library file to your application.

 

  You need to create a new project using the project wizard and make sure you enable floating point

  operation in the newly created project.

 

CrasyCat

0 Kudos
Reply