CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

stdlib.h compiler error

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








stdlib.h compiler error
PostPosted: Tue Apr 06, 2004 9:32 am     Reply with quote

While compiling a program, the compiler is flagging line 687 of the stdlib.h file for

Error[28] C:\PROGRAM FILES\PICC\drivers\stdlib.h 687 : Expecting an identifier

line 687 reads:
typedef signed int (*_Cmpfun)(char * p1,char * p2);

Any help would be appreciated.

Dan
Ttelmah
Guest







Re: stdlib.h compiler error
PostPosted: Tue Apr 06, 2004 10:04 am     Reply with quote

Anonymous wrote:
While compiling a program, the compiler is flagging line 687 of the stdlib.h file for

Error[28] C:\PROGRAM FILES\PICC\drivers\stdlib.h 687 : Expecting an identifier

line 687 reads:
typedef signed int (*_Cmpfun)(char * p1,char * p2);

Any help would be appreciated.

Dan

The commonest reason for this type of fault, is that something in front of the #include of stdlib, is redefining a value that the file uses. So if (for instance), you have some #defines in front of the point where you include the file, that define something called 'p1', or 'p2', you could generate this fault. Unfortunately, the 'error flaggin' of the compiler is also sometimes 'late', and the problem could be several lines before the one that is flagged.
So look carefully at what you are doing before the include.

Best Wishes
dan king



Joined: 22 Sep 2003
Posts: 119

View user's profile Send private message

PostPosted: Tue Apr 06, 2004 11:21 am     Reply with quote

I've gone in and included the stdlib.h in a previous code I wrote that does compile and the stdlib.h still flags the same error on the same line number and I'm sure that I'm not using p1 or p2 in that code. Now, I'm really confused. The only line in front of the stdlib.h is the device include for 16f877.h Mad
dyeatman



Joined: 06 Sep 2003
Posts: 1937
Location: Norman, OK

View user's profile Send private message

PostPosted: Tue Apr 06, 2004 11:40 am     Reply with quote

What version are you running?

I put 16F877.h and STDLIB in a new project and compiled them with version 3.188 and had no problems so it is something in the code or compiler version you are using.

Have you by chance got an "alternate" version of the 16F877.h or stdlib.h files that are different? If you do then the compiler might be seeing them instead....
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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