Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Tue Apr 17, 2012 9:07 am |
|
|
#PRAGMA is not supported at all. It really drives me mad to see the number of people using this, without just reading the manual. Remember CCS does not have a pre-compile 'pass' as such...
#PRAGMA ONCE, is not a standard feature of C. It is widely supported, but actually gives different results on some compilers, so should only be used with great caution, even when apparently supported...
The 'historical' way to do this, is to always write your include files to check if they are already loaded. So just have:
Code: |
//Include file for LCD
#ifndef MYLCD_INCLUDE
#define MYLCD_INCLUDE
//code
#endif
|
Three lines in each file - perhaps use the filename as the #define.
Best Wishes |
|