We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hai,
I had written a code in following way
#include <REGX55.H> #include <math.h> #include "DEFINE_H.h" void delay(unsigned int);
main()
{ while(1) { HEALTH = ~HEALTH; delay(65535); delay(65535); } }
void delay(unsigned int count) { while(count) count--; }
In DEFINE_H.h i had declared the HEALTH = p3_4 ;
BUT WHEN COMPILING THE PROJECT IT IS SAYING THAT HEALTH IS UNDEFINED IDENTIFIER. BUT I HAD DEFINED IN THE DEFINE_H HEADER FILE AND I HAD INCLUDED HEADER FILE IN A MAIN.C
You failed to notice the clearly-stated instructions that tell you how to post source code:
www.danlhenry.com/.../keil_code.png
People reading your post may overlook that error, and try to make sense of your post - but a Compiler will not.
When the compiler says something is "undefined", it means, more precisely, that there is no valid definition; ie, what you wrote was not valid as a definition.
Check your code very carfully to make sure that it is precisely correct and you have followed every rule in minute detail!
Did the compiler also report any other errors?