Trig using GT60

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Trig using GT60

2,242 次查看
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
标签 (1)
0 项奖励
回复
3 回复数

1,051 次查看
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 项奖励
回复

1,051 次查看
mjcoury
Contributor I
that answers the floating point question but not the math.h question
0 项奖励
回复

1,051 次查看
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 项奖励
回复