View previous topic :: View next topic |
Author |
Message |
mutevaggil
Joined: 29 May 2008 Posts: 8
|
Structures in header file gives error |
Posted: Mon Sep 08, 2008 1:31 am |
|
|
hi, its 16f690,
When I write a structure in a header file gives me "undefined identifier" error.
My structure is legal I think:
typedef struct{
int16 hasan;
byte Resolut;
int16 LowScale;
int16 HighScale;
long Password;
unsigned int8 PositionVal;
}MyType;
In main.h gives error, in main.c no gives error. Also I couldn't define my functions in header files. Why, do you have any idea ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Sep 08, 2008 1:08 pm |
|
|
Post a test program and a header file program so we can look at the
problem.
The test program could simply contain an #include for the PIC's .H file,
#fuses, #use delay() statements, the #include statement for your
other .H file, and a main(). That's it.
The other .H file could contain only your structure.
Then post your development environment. Are you using MPLAB with
a CCS command line compiler ? Or are you using the CCS IDE ?
Also post your compiler version. |
|
|
|