Ecpg pretty prints my code causing compile errors.
ie. code to compile:
EXEC SQL BEGIN DECLARE SECTION;
char bound_waiting_state =
static_cast<char>(Processor::waiting);
EXEC SQL END DECLARE SECTION;
turns into:
/* exec sql begin declare section */
#line 90 "Schedule.pgcc"
char bound_waiting_state = static_cast < char > ( Processor : :
waiting ) ;
/* exec sql end declare section */
#line 93 "Schedule.pgcc"
The scope operator becomes space padded and compiler barfs.
Work around is to initialise variables outside of declare section.
Regards,
Mark Pether.