Do we need checkapi.o in IDS 7.30.UC7A?
Posted in 1999
Topics: Installation, Setup & Upgrades, Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Platform-Specific Issues, Versions, Editions & End-of-Life
Hi, gurus We've some mixed C++ and ESQL/C modules in one project on Solaris 2.5.1. Basically we precompile the ESQL/C to .c file and then use CC to compile and link all the .o and needed libraries to execuatables. When we upgraded our Informix ODS 7.24 to IDS 73.0.UC7A we get a new c4gl package INFORMIX-4GL Version 7.20.UD7 which can compile 4gl source file as well as ESQL/C source file without any problem. But when the CC links all the .o file with needed libraries it produces the following errors: CC -g -I/export/home/is867/PCSmail/src/incl -I/export/home/is867/PCSmail/src/incl/plx -DTURBO -DBAKER_CORRECTION -L /opt/informix/lib -L /opt/informix/lib/esql -L /opt/informix/lib/tools -L /export/home/is867/PCSmail/lib -lnsl -lsocket -laio -lm -ltermlib -l4gl -lnforms -lfesql -lgen -los -lasf -lpposdb -lpposdate -lpposstr -lpposcommon -lpposlog -o oc02001d.exe \\ ../commserv/libwfapi/wfUtils.o ../commserv/libwfapi/wfapi.o \\ mipoc02_1.o /export/home/is867/PCSmail/src/lib/ifcclnt.a /export/home/is867/PCSmail/src/lib/plxnetc.a >>ild: (undefined symbol) ifx_checkAPI -- referenced in >>/opt/informix/lib/esql/libixos.so >>ild: (undefined symbol) ifx_checkAPI -- referenced in >>/opt/informix/lib/esql/libixgen.so >>ild: (undefined symbol) ifx_checkAPI -- referenced in >>/opt/informix/lib/esql/libixsql.so *** Error code 5 make: Fatal error: Command failed for target `oc02001d.exe' You noticed we stripped the needed libraries from c4gl shell script and added them to the CC's makefile. We used to have a checkapi.o file in $(INFORMIXDIR)/lib/esql directory and if I pointed to an old version of this object file in the link command I could link successfully without the above problem. But after upgrading to 7.30 we don't have ESQL/C package anymore so we don't have this checkapi.o anymore in the newly installed directory. My question is how can we solved this problem without linking with the old checkapi.o? TIA Dong _______________________________________________________________ Get Free Email and Do More On The Web. Visit http://www.msn.com
Dong Xiao wrote: > We've some mixed C++ and ESQL/C modules in one project on Solaris > 2.5.1. Basically we precompile the ESQL/C to .c file and then use > CC to compile and link all the .o and needed libraries to > execuatables. Basically correct; however, not using the esql script to do the linking is error prone, as you are now finding out. > When we upgraded our Informix ODS 7.24 to IDS 73.0.UC7A we get a > new c4gl package INFORMIX-4GL Version 7.20.UD7 which can compile > 4gl source file as well as ESQL/C source file without any problem. > But when the CC links all the .o file with needed libraries it > produces the following errors: I don't recommend using c4gl to link ESQL/C programs. You can do it, but it isn't recommended. > CC -g -I/export/home/is867/PCSmail/src/incl > -I/export/home/is867/PCSmail/src/incl/plx -DTURBO -DBAKER_CORRECTION > -L /opt/informix/lib -L /opt/informix/lib/esql -L > /opt/informix/lib/tools -L > /export/home/is867/PCSmail/lib -lnsl -lsocket -laio -lm -ltermlib > -l4gl -lnforms -lfesql -lgen -los -lasf -lpposdb -lpposdate > -lpposstr -lpposcommon -lpposlog -o oc02001d.exe \\ > ../commserv/libwfapi/wfUtils.o ../commserv/libwfapi/wfapi.o \\ > mipoc02_1.o /export/home/is867/PCSmail/src/lib/ifcclnt.a > /export/home/is867/PCSmail/src/lib/plxnetc.a > >>ild: (undefined symbol) ifx_checkAPI -- referenced in > >>/opt/informix/lib/esql/libixos.so > >>ild: (undefined symbol) ifx_checkAPI -- referenced in > >>/opt/informix/lib/esql/libixgen.so > >>ild: (undefined symbol) ifx_checkAPI -- referenced in > >>/opt/informix/lib/esql/libixsql.so > *** Error code 5 > make: Fatal error: Command failed for target `oc02001d.exe' > > You noticed we stripped the needed libraries from c4gl shell script > and added them to the CC's makefile. Inherently a bad idea; any time you change version of ESQL/C or c4gl, you will probably have to change the library list in this makefile. Not to mention the possibility of needing to switch between shared and static libraries, which requires different linking sequences in general to avoid link-time errors. > We used to have a checkapi.o file in > $(INFORMIXDIR)/lib/esql directory and if I pointed to an old version > of this object file in the link command I could link successfully > without the above problem. But after upgrading to 7.30 we don't have > ESQL/C package anymore Why not? The ClientSDK product contains ESQL/C and is available at the purely nominal charge of $0.00 and your phone bill for downloading it. > so we don't have this checkapi.o anymore in the newly installed > directory. > > My question is how can we solved this problem without linking > with the old checkapi.o? Go and get CSDK and use the ESQL/C in that instead of c4gl to do the linking. Also check out the IIUG web site; there should be an article in there on handling ESQL/C and C++ which I wrote; it is also TechInfo #5563 at Informix. The current version should be dated March 1999, I think -- let me know if the IIUG (and/or the main TechInfo database) is out of date. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>