??? 03/13/04 14:17 Read: times |
#66648 - RE: Problems with separate compilation Responding to: ???'s previous message |
Richard:
It is not readily apparent what the problem is with the portion of the header file that you have shown but I would like to suggest something that I think you should avoid. If you have a header file named "lcd.h" and you use the recommended scheme, as you have shown, to bracket the header file contents in an #ifndef to avoid multiple inclusion then I would use a different naming syntax than you have shown. Try something more like: #ifndef _INC_LCD_H_ #define _INC_LCD_H_ extern void LCD_init (void); extern void LCD_write_cmd (byte cmd); extern void LCD_write_data (byte disp); extern void LCD_write_data_string (byte *string1); #endif The problem of defining a very simple literal such as _LCD_ is that it can very easily be found in your actual source code if you mistakenly have typos in the source. Look for example to the similarity on several fiunctions you prototyped as LCD_xxx. It is the ususal case that the compiler would spit out errors for typos of the type _LCD_init()....but in some instances the strangest things can happen when the typo sneaks through the compile process. You can spend many hours looking for a problem like this!! Michael Karas |
Topic | Author | Date |
Problem compiling in Keil | 01/01/70 00:00 | |
Problems with separate compilation | 01/01/70 00:00 | |
RE: Problems with separate compilation | 01/01/70 00:00 | |
RE: Problems with separate compilation![]() | 01/01/70 00:00 |