I'm new to db2. I've copied a small example program somewhere.My compiler is gcc. When I compile it I get some errors:
In file included from test2.c:20:
sqladef.h:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlaaloc’
sqladef.h:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlaAllocateCu rsorRS’
sqladef.h:106: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlaAssociateL ocatorRS’
sqladef.h:113: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlaAssocLocat orRS’
sqladef.h:120: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlacall’
sqladef.h:126: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlacmpd’
sqladef.h:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqladloc’
What's wrong?? Thanks for help!
In file included from test2.c:20:
sqladef.h:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlaaloc’
sqladef.h:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlaAllocateCu rsorRS’
sqladef.h:106: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlaAssociateL ocatorRS’
sqladef.h:113: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlaAssocLocat orRS’
sqladef.h:120: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlacall’
sqladef.h:126: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqlacmpd’
sqladef.h:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribu te__’ before ‘sqladloc’
What's wrong?? Thanks for help!
Code:
/* Prototypes for Runtime API's */
SQL_API_RC SQL_API_FN sqlaaloc(unsigned short,
unsigned short,
unsigned short,
void *);
SQL_API_RC SQL_API_FN sqlaAllocateCursorRS (
sqluint16,
sqluint32,
void *);
SQL_API_RC SQL_API_FN sqlaAssociateLocatorRS (
sqluint32,
int,
char *,
int,
void *);
SQL_API_RC SQL_API_FN sqlaAssocLocatorRS (
sqluint32 *,
int,
char *,
int,
void *);
SQL_API_RC SQL_API_FN sqlacall(unsigned short,
unsigned short,
unsigned short,
unsigned short,
void *);
SQL_API_RC SQL_API_FN sqlacmpd(unsigned short,
unsigned short,
unsigned short,
unsigned short,
void *);
Comment