Need esqlc HP-UX thread library consultant/guru
Posted in 2005
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues, Internationalization & Character Sets, Jobs, Consulting & Announcements
Have a esql program similar to demo1.ec that must run with the thread libraries on HP-UX 11.11. When a 'esql -thread program.ec -o program' is run, the program works. However when the following 2 steps are run with a compile and link it does not work (run time errors are 'State was 01I01 and code was 0'): 1. 'esql -thread program.ec'. 2. cc program.c -o program \\ -I$INFORMIXDIR/incl/esql \\ -Wl,-v,-s,+s,-a,shared_archive,-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql \\ -lthsql -lthasf -lthgen -lthos -lifgls \\ -lnsl_s -lm -lsec -lnsl_s \\ /home/informix/lib/esql/checkapi.o -lifglx \\ -lpthread A 'chatr program' on the version that works and version does not work is similar. Need to get this resolved and also may need some additional support as I move forward. Interested parties should email me. Thanks
koreilly@emangoe.com wrote: > Have a esql program similar to demo1.ec that must run with the thread > libraries on HP-UX 11.11. > > When a 'esql -thread program.ec -o program' is run, the program works. > > However when the following 2 steps are run with a compile and link it > does not work (run time errors are 'State was 01I01 and code was 0'): > > 1. 'esql -thread program.ec'. > > 2. cc program.c -o program \\ You need to compile the ESQL/C code to object - and then do the linking. I'm 99% sure there are options to the C compiler that ensure thread safety that you're not using in this compile and link line. Or, use 'esql -c -thread program.ec' and then replace 'program.c' with program.o. And, best of all, use esql to do the linking -- since it works. > -I$INFORMIXDIR/incl/esql \\ > -Wl,-v,-s,+s,-a,shared_archive,-L$INFORMIXDIR/lib > -L$INFORMIXDIR/lib/esql \\ > -lthsql -lthasf -lthgen -lthos -lifgls \\ > -lnsl_s -lm -lsec -lnsl_s \\ > /home/informix/lib/esql/checkapi.o -lifglx \\ > -lpthread > > A 'chatr program' on the version that works and version does not work > is similar. Why do you think it is better to link without the esql script? I'd go to great lengths to use it. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/