Re: repost: esql compile problems
Posted in 2000
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Data Types & Schema Design
No I don't define it, the 'std C' copes it's just the esql bit that errors. Normally the demo program I just c4gl <prog> -o <runprog> and it all works mars1972@my-deja.com wrote: > > > for timeout.ec in demo code > > > > mint cnt = 0; #OK > > int4 ret = 0; #OK > > int4 sqlcode = 0; #OK > > int4 sqlerr_code, sqlstate_err(); #OK > > void disp_exception(), disp_error(), disp_warning(); > > > > EXEC SQL BEGIN DECLARE SECTION; > > char fld1_val[ CHARFLDSIZE + 1 ]; > > char fld2_val[ CHARFLDSIZE + 1 ]; > > int4 int_val; #Fails > > EXEC SQL END DECLARE SECTION; > > In order to use a data type inside an exec sql declare section, it must > first be defined inside a declare section. Where is int4 defined? If > you defined it, try putting the definition inside of an exec sql declare > section, like this: > exec sql begin declare section; > typedef ...; > exec sql end declare section; > > or if it was defined in a header file, try using > > exec sql begin declare section; > exec sql include <someheader.h>; > exec sql end declare section; > > -- > # unrm / > ksh: unrm: not found > # man cpio > > Sent via Deja.com http://www.deja.com/ > Before you buy. -- Paul Watson # WF Software # If it was easy Tel ++44 1436 674729 # Everybody could do it Fax ++44 1436 678693 # www.wfsoftware.com/informix #
> No I don't define it, the 'std C' copes it's just the esql bit that > errors. Normally the demo program I just c4gl <prog> -o <runprog> and > it all works > Hmm... I don't use c4gl, I've always used esql. I wonder if there's a difference in the way they compile in the headers that's causing my confusion. I do know that I have to do the exec sql include decimal.h if I want to use the dec_t typedef, even though it's included by sqltypes and sqlhdr. -- # unrm / ksh: unrm: not found # man cpio Sent via Deja.com http://www.deja.com/ Before you buy.