Trig using GT60

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

Trig using GT60

2,251 Views
mjcoury
Contributor I
Is it possible to use Trig (i.e. Sine, Cosine, etc) with the GT60 MCU. Also how do you incoroprate MATH.h into your project?

I am getting the following error

L1822: Symbol sin in file is undefined
L1822: Symbol cos in file is undefined

with

#include at the top of my program

also is the return of sin or cos at double or a float? because both are availalbe according to math.h
Labels (1)
0 Kudos
Reply
3 Replies

1,060 Views
CrasyCat
Specialist III
Hello
 
I assume you are using CodeWarrior for HC08. Am I right?
If this is the case, did you create your project using the project wizard?
Did you specify you want to use floating point arithmetic in your application when creating the project?
 
These are MUST DO. If you do not specify you want o use floating point arithmetic in your application, you will not be using the appropriate library file and you will not be able to link your application.
 
I hope this helps.
 
CrasyCat
0 Kudos
Reply

1,060 Views
mjcoury
Contributor I
that answers the floating point question but not the math.h question
0 Kudos
Reply

1,060 Views
CrasyCat
Specialist III
Hello
 
In fact you just need to include the file math.h in your source code.
If you have created your project from a stationery, the paths to the include file should be set up
correctly and you should be able to compile your file,
 
Anyway including the .h file will make sure the compiler calls the function the appropriate way,
but will not add the math code to the application you have to add the appropriate library file to your project.
 
CrasyCat
0 Kudos
Reply