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 support@ccsinfo.com

Why won't this compile?

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



Joined: 08 Oct 2012
Posts: 4

View user's profile Send private message

Why won't this compile?
PostPosted: Wed Oct 17, 2012 6:06 am     Reply with quote

I'm at a loss as to why this won't compile. It would appear that PCH (v4.135) doesn't support pointers to pointers, but if I try another example of this, it works.

If one of the asterisks are deleted from "pucFrame", it compiles, but of course I can't use it like this.

Code:

#pragma case
#include <18F8527.h>

typedef unsigned char UCHAR;
typedef char CHAR;

typedef unsigned int16 USHORT;
typedef signed int16 SHORT;

typedef unsigned int32 ULONG;
typedef signed int32 LONG;

typedef enum
{
    MB_ENOERR,                  /*!< no error. */
    MB_ENOREG,                  /*!< illegal register address. */
    MB_EINVAL,                  /*!< illegal argument. */
    MB_EPORTERR,                /*!< porting layer error. */
    MB_ENORES,                  /*!< insufficient resources. */
    MB_EIO,                     /*!< I/O error. */
    MB_EILLSTATE,               /*!< protocol stack in illegal state. */
    MB_ETIMEDOUT                /*!< timeout error occurred. */
} eMBErrorCode;


typedef eMBErrorCode( *peMBFrameReceive ) ( UCHAR *pucRcvAddress,
                                            char **pucFrame,   //delete one "*" to compile
                                            USHORT *pusLength );

                              
void main(void)
{
   static peMBFrameReceive peMBFrameReceiveCur;

}
 
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Oct 17, 2012 12:18 pm     Reply with quote

See this thread. It has a recommendation that might help:
http://www.ccsinfo.com/forum/viewtopic.php?t=34909

Or this one has a work-around:
http://www.ccsinfo.com/forum/viewtopic.php?t=49064
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