Byron Dally

Compiling errors

Discussion created by Byron Dally on Feb 10, 2010
Latest reply on Feb 11, 2010 by Byron Dally

Hi I am new to HC08 (hence the alias)

and am trying to take over from the previous software developer.
I am working with a

MC9S08GT60 in CodeWarrior 6.3 

Going through his code, I am getting the following compiler errors, when I try build this file.

Errors:

 


Warning : C1013: Old style declarationascii_utilities.h line 5   Error   : C2801: 'IDENT' missingascii_utilities.h line 5   Error   : C5002: Illegal typeascii_utilities.h line 5   Error   : C1400: Missing parameter name in function headascii_utilities.h line 5   Error   : C2450: Expected:  . * + - & ! ~ ++ -- -> [ (  IDENT CONSTANT STRING sizeof __alignof__ __va_sizeof__ __va_arg_type__    ascii_utilities.h line 5   Error   : C1834: Indirection applied to non-pointerascii_utilities.h line 5   Error   : Compile failed

 

 The files Im trying to compile are simply:

ascii_utilities.c

 


#include "includes.h"void int2string (__uint32__ value, char *string) { __uint8__ remainder; __uint8__ offset = 9;  strcpy(string, "          ");  do {  remainder = value % 10;  string[offset] = dec2char(remainder);  value = value / 10;  offset--; }  while (value != 0); string[10] = 0;  //Set to null.}char dec2char(__uint8__ value) { if ((value >= 0) && (value <=9))  return (char) (value + 0x30); else  return 0;}

 and

ascii_utilities.h 

 

#ifndef _UTIL_H_ #define _UTIL_H_//Prototypesvoid int2string(UINT32, char *);char dec2char(UINT8);#endif

 

I've been looking at the 'HC08 Compiler Messages' help file, but Im struggling to resolve these errors.

I thought it might be the way the parameters to the functions are being declared, but no luck :smileysad:

 

help?

thanks,

Byron 

Outcomes