|
|
View previous topic :: View next topic |
Author |
Message |
Dan King Guest
|
including header files |
Posted: Fri Jan 17, 2003 3:55 pm |
|
|
How do you include header files? When I include a header file from a previously successfully compiled example, the file won't compiler properly in my project. I am using PCM with the 16f877 PIC. I get errors of:
Undefined identifier:
#define LCD_LINE2 0x40
if I comment out that line, then the preceeding line pops up with the same error. Any help would be appreciated.
Thanks
___________________________
This message was ported from CCS's old forum
Original Post ID: 10767 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: including header files |
Posted: Fri Jan 17, 2003 4:26 pm |
|
|
:=How do you include header files? When I include a header file from a previously successfully compiled example, the file won't compiler properly in my project. I am using PCM with the 16f877 PIC. I get errors of:
:=
:=Undefined identifier:
:=
:=#define LCD_LINE2 0x40
:=
:=if I comment out that line, then the preceeding line pops up with the same error. Any help would be appreciated.
:=
----------------------------------------------------------
Here's an example of where to put the include statements
in your source file:
<a href="http://www.pic-c.com/forum/general/posts/50.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/50.html</a>
I have some questions:
1. What is your version of the compiler ?
2. Are you compiling within MPLAB ?
If so, what version of MPLAB ?
3. If you're doing it within MPLAB, do you have multiple
files open, and if so, do you have the "include" file
on top (ie., the topmost window), when you compile ?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10770 |
|
|
Dan King Guest
|
Re: including header files |
Posted: Mon Jan 20, 2003 7:20 am |
|
|
:=:=How do you include header files? When I include a header file from a previously successfully compiled example, the file won't compiler properly in my project. I am using PCM with the 16f877 PIC. I get errors of:
:=:=
:=:=Undefined identifier:
:=:=
:=:=#define LCD_LINE2 0x40
:=:=
:=:=if I comment out that line, then the preceeding line pops up with the same error. Any help would be appreciated.
:=:=
:=----------------------------------------------------------
:=
:=Here's an example of where to put the include statements
:=in your source file:
:= <a href="http://www.pic-c.com/forum/general/posts/50.html" TARGET="_blank"> <a href="http://www.pic-c.com/forum/general/posts/50.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/50.html</a></a>
:=
:=I have some questions:
:=
:=1. What is your version of the compiler ?
:=
:=2. Are you compiling within MPLAB ?
:= If so, what version of MPLAB ?
:=
:=3. If you're doing it within MPLAB, do you have multiple
:= files open, and if so, do you have the "include" file
:= on top (ie., the topmost window), when you compile ?
:=
:=
:=
Hi,
The pcm compiler version is 3.130
mplab version = 5.11.02
I just tried compiling with the included file on top, after verifying that the include statement appears immediately after the device include, and still no go. The compiler state the following error
Error[12] D:\MICROC~1\MEMSIC\mem_lcd.h 26 : Undefined identifier ?
and line 26 is:
#define LCD_LINE2 0x40
I'll keep trying. Thanks.
___________________________
This message was ported from CCS's old forum
Original Post ID: 10818 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: including header files |
Posted: Mon Jan 20, 2003 11:43 am |
|
|
:=The pcm compiler version is 3.130
:=mplab version = 5.11.02
:=I just tried compiling with the included file on top, after verifying that the include statement appears immediately after the device include, and still no go. The compiler state the following error
:=
:=Error[12] D:\MICROC~1\MEMSIC\mem_lcd.h 26 : Undefined identifier ?
-------------------------------------------------------
Actually, I was describing how to cause the problem, not
how to prevent it.
I know that in the past, there was a problem with either
the compiler or MPLAB or both. If you compiled a file
with an include file open, and in the top window, then
all errors would be listed as being in the include file,
even though they were in the C source file.
To fix this problem (temporarily), you had to re-start Windows.
Just re-starting MPLAB would not fix it. (And don't open
any include files).
Try that. See if the problem goes away. If it does, then
try upgrading to MPLAB vs. 5.70. I'm using 5.70, and I
don't have the problem. (I'm also using PCM 3.13x)
___________________________
This message was ported from CCS's old forum
Original Post ID: 10822 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|