Re: Informix 7.22 netlib.a library missing
Posted in 1997
>From: Charles Roberts <chuckgr@bnr.ca> >Date: Thu, 07 Aug 1997 09:04:08 -0500 >X-Informix-List-Id: <news.41354> > >When trying to compile our Rogue Wave Informix >access library against our new version of Informix (7.22 UC1), >we received the following error: > > Testing CONNECT ... > esql -e inftest.ec > cc -c -I. -I/usr/informix/incl/esql inftest.c > cc -o inftest inftest.o -L/usr/informix/lib >-L/usr/informix/lib/esql -m I think some of the link line is missing! >cc: 1501-228 input file /usr/informix/lib/netlib.a not found >make: 1254-004 The error code from the last command is 252. > >Can someone tell me if this library was renamed and/or >why it was removed ? > >Any assistance is much appreciated. I've said it before, and I guess I'll end up saying it again in the future, and I'm going to repeat myself now just for good measure: The only way to link anything that uses ESQL/C is to use the esql script to do the linking. The libraries used by Informix change with every release, for most purposes. You should certainly assume that they do. The job of the esql script is to keep on top of the changes. If you really decide to do the linking manually, you will have to be prepared to redesign your link lines for each release of ESQL/C, on each platform where you port your software. If you use the esql script, you don't! Note the per-platform bit; there is no guarantee that the libraries used on a Solaris machine are the same as the ones used on an HP-UX or DEC OSF/1 machine. Be aware that the 9.12 release (IUS and DevSDK - Developer's SDK, previously called ESQL/C) have yet more libraries and the names have been changed systematically, and so on, in comparison with both earlier 9.0x and 9.1x releases, and in comparison with 7.2x releases, etc. But, I have ESQL/C programs which compile and link OK under 5.00 through 9.12 using the esql script on a number of platforms -- that really is the only way to do it! Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> PS: Warning I do not reply to messages with anti-spam in the return path. Those who don't study history are doomed to repeat it... Or words to that effect. --------------------------------------------------------------------------- Date: Thu Jul 6 08:08:40 1995 From: johnl@informix.com (Jonathan Leffler) To: informix-list@rmy.emory.edu, kaa@MCS.COM Subject: Re: Using cc instead of esql for linking >From: kaa@MCS.COM (Kayode Akanni) >Date: 6 Jul 1995 00:52:45 -0500 >X-Informix-List-Id: <news.15177> > >I want to be able to use cc instead of esql to link object files in >a project I am presently working on. However, I still get undefined >errors after I have what I consider the relevant libraries on the link >line ( -lsql -lgen -lasf netlib.a -los -lnsl). My goal is to create an >archive library of esql routines that I can then call in a C/C++ code. >Anybody get an opening on this one? The compilation scripts are designed to protect innocent users (eg you) from the harsh realities of what is necessary to get the products to work. Use the esql script for compiling and linking. The list of libraries varies from version to version. And if you get to ESQL/C version 7.20, you get threaded libraries and non-threaded libraries in shared and non-shared forms, etc. Also, there are places where the order of the libraries changes depending on whether the libraries are threaded or not. The list of libraries required changes too. Do not, ever, try doing without the esql script. Use it; do not try to avoid using it, because you will be bitten, probably badly, when you port to a different machine, or a new version of the products. Similar comments apply to I4GL and the c4gl script. If you want to switch compilers, you can set the INFORMIXC environment variable. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> Date: Fri Jul 7 07:58:26 1995 From: johnl (Jonathan Leffler) To: kaa@mcs.com Subject: Re: Using cc instead of esql for linking >Date: Thu, 6 Jul 95 23:21 CDT >From: kaa@mcs.com (Kayode Akanni) >To: johnl@informix.com >Subject: Re: Using cc instead of esql for linking > >I appreciate your recommendation on using the esql script. But >how do I create my own archive library with without touching the script? >That is really my goal. I tried the esql programming manual without luck, >what can I do to achieve my goal with the script without loosing the good >reasons you emphasized? Build library: ar ru libmine.a libfile1.o libfile2.o libfile3.o Link with library: esql -o myprog myesql1.o myesql2.o -L. -lmine or: esql -o myprog myesql1.o myesql2.o libmine.a Substitute the directory where the library is for the dot in the "-L." option. Unrecognized options are passed through ESQL to the C compiler. That means you can play games with "-Wall -Wshadow -ansi -pedantic" and the GCC compiler, and use the esql script, etc. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> PS: I think the c.d.i newsgroup might benefit from this answer -- please post it if you agree. Date: Fri Jul 7 10:11:15 1995 From: johnl (Jonathan Leffler) To: zzz6351@epx.cis.umn.edu Subject: Re: USING CC INSTEAD OF ESQL Interesting. I haven't had to fix Purify; I simply arrange that the environment variable INFORMIXC is set to "purify cc" and it all works fine. That, of course, assumes that you have a sufficiently recent esql script that it recognizes this environment variable, but I'd rather fix the esql script than the purify script. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> >From: zzz6351@epx.cis.umn.edu (Information Advantage) >Date: 7 Jul 1995 15:22:24 GMT >X-Informix-List-Id: <news.15233> > >Timothy Hood (timothy.hood@sltrib.com) wrote: >: K> From: kaa@MCS.COM (Kayode Akanni) > >: K> I want to be able to use cc instead of esql to link object files in >: > a project I am presently working on. However, I still get undefined >: > errors after I have what I consider the relevant libraries on the link >: > line ( -lsql -lgen -lasf netlib.a -los -lnsl). My goal is to create an >: > archive library of esql routines that I can then call in a C/C++ code. >: > Anybody get an opening on this one? > >I also had to create a library of esql routines and call them from c/c++ apps, >but I used the esql program to do it. Is there any reason you don't want to >use esql? > >One problem that I had with it is that it didn't work with Purify. We use >this product to search for memory allocation and reference errors. >It uses a shell script which checks your linker, esql is not one of >its known linkers and therefore causes it to bomb. I had to modify the purify >script and introduce it to esql. > >Kurt Mehlhoff > >Software Engineer Information Advantage >kurt@infoadv.mn.org 7401 Metro Blvd. Ste. 500 >uunet!tcnet!infoadv!kurt