#define RR0 1 #define RR1 0 void main() { ... #if RR0 precedure0(); #elif RR1 precedure1(); #endif ... }
#define RR0 0 #define RR1 1
Examine the preprocessor output. see Andy's Handy Hint for Debugging Preprocessor Problems: http://www.8052.com/forum/read.phtml?id=29152 You also need to explain precisely what you mean by, "can never be compiled and link" - but examine the preprocessor output first.
Please post the smallest complete program that exhibits the problem along with the exact text of any error or warning messages.
Nantian, I'm going to just take a wild guess here. Here are some options: 1. You've misspelled "precedure1()" and it doesn't match the actual name of your function. 2. "precedure1" is in another C file and you didn't include the header to declare it. Those are my only guesses without, as Stefan requested, a copied-and-pasted chunk of your program that shows the problem.
the program can never be compiled and link.can you tell me what the matter is ? Not really, but maybe theerror message(s) can Erik
Sorry ,just my fault.There is mistake with 'procedure1()',so it can't be compiled and linked . Thank you very much!
"There is mistake with 'procedure1()',so it can't be compiled and linked." It's always best to pay attention to the specific error messages first. Remember, if you double-click a compiler error message, it will take you straight to the relevant 'C' source line; Also, select any error message, then press F1, and you will get help on the specific message.