This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error C141: syntax error near 'stTimeStr'

hi there, i have struct with the problem.I'm writing a code for DS12887,And typedef two structures in the header file.It is normal before writing a function.
But now the error C141.
I am more confused. Ask for The help
Header file:

#include <stdio.h>
#include <absacc.h>
typedef struct
{
  ......
}stTimeStr;

typedef struct
{
  ......
}stDsStatus;

void InitaliseDS(stTimeStr* stClkTime,stTimeStr* stAlmTime);

void SetClkTime(stTimeStr* stClkTime);

void SetAlmTime(stTimeStr* stAlmTime);

void GetDSStatus(stDsStatus* stStat);


C Source file:

#include <stdio.h>
#include <absacc.h>
#include "DS12887.h"

void InitaliseDS(stTimeStr* stClkTime,stTimeStr* stAlmTime)
{
  ......
}


void SetClkTime(stTimeStr* stClkTime)
{
  ......
}

void InitaliseDS(stTimeStr* stClkTime,stTimeStr* stAlmTime)
{
   ......
}
void GetDSStatus(stDsStatus* stStat)
{
  ......
}

void GetDSStatus(stDsStatus* stStat)
{
  ......
}

Parents
  • But how hard is it to figure out if there exists any type byte_1, and if it is conditionally disabled or not?

    It could be hard or easy, depending on how complex the header files construct is of which we only get to see the file name: ComUnit.h. The crucial technique to resolve this kind of problem hasn't been mentioned so far: the extraction and inspection of preprocessor output. So: have uVision generate a preprocessor output listing, and look at it very closely.

Reply
  • But how hard is it to figure out if there exists any type byte_1, and if it is conditionally disabled or not?

    It could be hard or easy, depending on how complex the header files construct is of which we only get to see the file name: ComUnit.h. The crucial technique to resolve this kind of problem hasn't been mentioned so far: the extraction and inspection of preprocessor output. So: have uVision generate a preprocessor output listing, and look at it very closely.

Children