Re: esql 7.20 problem
Posted in 1997
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
William Harris wrote: > > In article <33E73379.1F3B@worldnet.att.net>, rdorgan@worldnet.att.net says... > >Here's an example: > >int main(void) > >{ > > dtime_t dt; > > short t[3]; > > $long Today; > > > > dtcurrent(&dt); > > rtoday(&Today); > > printf("Today = %d\\n",Today); > > t[0] = 5; > > t[1] = 29; > > t[2] = 1997; > > Today = -1; > > (void) rmdyjul(t,&Today); > > printf("yesterday = %d\\n",Today); > >} > >To build: > >1) esql -e atest.ec > >2) mv atest.c atest.C > >3) gcc or (CC) -I$INFORMIXDIR/incl/esql -c datest.C > >4) esql datest.o > > Aside from the typo of atest.ec for what you undoubtedly meant to be > datest.ec, and the other possible typo at the omission of <stdio.h>, I'd let > the C++ compiler link it (eg, step 4, CC main.o $INFORMIXDIR/lib/esql/*.a > {and any other OS libraries you may need}). > > The Informix include files also incorrectly depend on having __STDC__ defined. > You may need to alter step 3 to add a -D__STDC__ to get it to compile. Some > C++ compilers define this, some don't; of those I know about, gcc and xlc on > the IBM define it, HPUX's CC doesn't. true enough. However, __STDC__ is NOT C++. the define for it is -cplusplus. That is what, IMHO, should be in the informix include files. In fact, it is in some of them, but not (notably) in the case I posted, dateime.h. As an aside, isnt it about time informix formally supported C++? Geez, I've been using for at least 5 years! What's the deal? > -- > William Harris william@carsinfo.com > Check out the NAGS spam filter. http://www.cs.hmc.edu/~ivl/nags/index.html