Help
Advanced Member level 2
- Joined
- Feb 15, 2005
- Messages
- 617
- Helped
- 7
- Reputation
- 14
- Reaction score
- 3
- Trophy points
- 1,298
- Activity points
- 7,065
(char code * code *) keil
Hi,
Above the structure declared the function in structure. This sample code is picked from other sample project code.
The call functions:
I'm using Keil compiler. I had tryed put this code in my compiler but compiler show few warning, ex:
WARNING L2: Reference Made to Unresolved External
SYMBOL: Byte1
How to remove the warning?
Please help me....
Thank you.
Code:
/* ----------------------------------------------------------------------
* DECLARE your own open(), close(), addr(), and byte() routines here.
*
*/
static int open1(), close1(), addr1(), byte1();
static int open2(), close2(), addr2(), byte2();
static int open3(), close3(), addr3(), byte3();
static int open4(), close4(), addr4(), byte4();
/* ----------------------------------------------------------------------
* ADD an entry to this table to register your
* output format routines. Give your object format
* a name to be specified with the -F option.
*
*/
static int format;
static struct {
char *name;
int (*e_open)();
int (*e_close)();
int (*e_addr)();
int (*e_byte)();
} formtab[] = {
{ "tdr", open1, close1, addr1, byte1 },
{ "byte", open2, close2, addr2, byte2 },
{ "od", open3, close3, addr3, byte3 },
{ "srec2", open4, close4, addr4, byte4 },
{ "srec3", open4, close4, addr4, byte4 },
{ "srec4", open4, close4, addr4, byte4 }
};
#define FORMTABSIZE (sizeof(formtab)/sizeof(formtab[0]))
Hi,
Above the structure declared the function in structure. This sample code is picked from other sample project code.
The call functions:
Code:
(*formtab[format].e_open)(file,ftype,arg);
(*formtab[format].e_close)();
(*formtab[format].e_addr)(a);
(*formtab[format].e_byte)(b);
I'm using Keil compiler. I had tryed put this code in my compiler but compiler show few warning, ex:
WARNING L2: Reference Made to Unresolved External
SYMBOL: Byte1
How to remove the warning?
Please help me....
Thank you.