function prototypes for esql
Posted in 2009
Topics: High Availability & Replication, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
I'm trying to include sqlhdr.h so that the compiler will tell me if I do something stupid like call rdefmtdate() with the wrong variable types, but it doesn't seem to pick up the prototype. If I explicitly put the function prototype for rdefmtdate() into my code I do get a compiler warning. If I simply do a #include "sqlhdr.h" I get nothing. I do see the #ifdef __STDC__ and I've made sure this is defined. What am I missing? Platform is AIX 5.2 ESQL version is 7.24.UC5 (we're retro here)
Change that to: EXEC SQL INCLUDE sqlhdr.h; Art Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Wed, Nov 11, 2009 at 11:47 AM, D WRIGHT <danny.wright@jbssa.com> wrote: > I'm trying to include sqlhdr.h so that the compiler will tell me if I do > something stupid like call rdefmtdate() with the wrong variable types, but > it > doesn't seem to pick up the prototype. > > If I explicitly put the function prototype for rdefmtdate() into my code I > do > get a compiler warning. > > If I simply do a #include "sqlhdr.h" I get nothing. > > I do see the #ifdef __STDC__ and I've made sure this is defined. > > What am I missing? > > Platform is AIX 5.2 > ESQL version is 7.24.UC5 (we're retro here) > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --00151747ba9cd9d9d30478248341
Thanks for the reply. I had tried that too. I did figure it out though. Our compiler was using extended C by default and silently ignores defining of __STDC__. Adding the command line option "-qlanglvl=extc89" (or stdc89 or stdc99 or saa or saal2) got me my prototypes. Setting INFORMIXC=xlc also works.