Log in

View Full Version : EasyC and Math


Wynlyndd
25-01-2007, 21:41
My team has limited programming skills so we have so far made a decision to use EasyC Pro.

Understanding that many of you will recommend lookup tables, we are nonetheless trying to use trig functions such as tan in our code for the moment.

I believe I need to add a math.h file to my easyc project, but I am unsure how to #include <math.h> to say, my initialize function block.

I have installed both mplab and easyc on the same machine and the math.h file I have is from the C:\mcc\ directory.

Any clues?

Jon236
25-01-2007, 21:48
Courtesy of Brad Miller and the great folks at WPI:

You can get all the standard math libraries which are described in the Microchip C18 Users Guide. To do this and not get compiler errors you must include <math.h> which can be done from the "File inclusion" dialog on the Options menu. Make sure to include the <> as part of the file name.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute