Re: help needed for compiling esql/c demo programs
Posted in 1998
Bob Tucker wrote: > I just installed the esqldemo7 database that comes with SE. I can't > figure out how to compile the sample programs. I've been trying to get > the "rtoday.ec" program to work as my test. > > First I do "esql rtoday.ec", which gives me the "rtoday.c" file. It should also give you an a.out file. esql -o program program.ec # Single file to executable esql -c program.ec # Single file to object esql -c aux.ec # Another file to object esql -o prog program.o aux.o # Object file linking Do not, ever, under any circumstances where you'll even think of griping when it stops working, use the C compiler directly to do the ESQL/C linking -- use the esql script. Always! Absolutely always, even if you have to tell it all sorts of fibs about what the C compiler is called. > But then I can't compile "rtoday.c". > > I've tried stuff like: > gcc -I/informix/incl/esql -L/informix/lib/esql rtoday.c -lsql > > (tried -l at the end for every library). But every time it says > "undefined reference to 'rtoday' " > "undefined reference to 'rdatestr' " > > can someone help me out? > > -bob -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>