Trying to create libxxx.sl on HPUX with ESQL/C
Posted in 2000
I have created and working a shared library on HPUX 11.0 using the gcc compiler. The informix engine is 7.31.UC4, and esql is 7.24.HC2 Example: I start with thing.c, and end up with libthing.sl which works just fine. gcc -c -g -O2 -fpic -MD -Wall thing.c ld -G -b -o libthing.sl thing.o Now there is a need to have a function within the .sl file access an informix database. I tried renaming the file to thing.ec, and inserting the appropriate EXEC SQL commands, and changing my compiler from "gcc" to "esql". As shown below, but it doesn't work. esql -c -g -O2 -fpic -MD -Wall -I/usr/informix/incl/esql thing.ec ld -G -b -o libthing.sl thing.o I have been programming with .ec files for quite a while now. Programming .sl files is new to me, and am wondering if anyone can help figure out if and how to accomplish this. I have a feeling it has something to do with the informix run-time libraries. If so, is there a way to compile statically and have the informix routines become part of my .sl file?