Unix makefile for ESQLC with GLS
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Internationalization & Character Sets
We just moved to 7.20 from something older and simpler. I have couple of programs I maintain with make, for eslqc is just a part of the program. I fashioned a makefile that included the ESQL includes as needed and the ESQL librarie as needed. My make command creates oodles (a technical term, I know) of complaints, and they all look like GLS issues to me. Here is a sample: % make qtrtape gcc -o qtrtape qtrmain.o qtr_rtape.o qtr_writer.o \\ /usr/local/informix/lib/esql/libsql.a \\ /usr/local/informix/lib/esql/libos.a \\ /usr/local/informix/lib/libixasf.a \\ /usr/local/informix/lib/esql/libgen.a \\ /usr/local/informix/lib/esql/libos.a \\ /usr/local/informix/lib/esql/libgen.a -lnsl -lsocket -laio -lm Undefined first referenced symbol in file gl_full_mbschr /usr/local/informix/lib/libixasf.a(driver.o) gl_lc_spec2lc_fname /usr/local/informix/lib/esql/libgen.a(initgls.o) and it goes on from there. TIA.
KONE wrote: > > We just moved to 7.20 from something older and simpler. I > have couple of programs I maintain with make, for eslqc > is just a part of the program. I fashioned a makefile > that included the ESQL includes as needed and the ESQL That was your first mistake. Fortunately your second was not doing what I'm about to suggest so it is easily fixed. Informix has never had any qualms about moving libraries and header files around, renaming them, adding new ones and shifting functions from one library to another. Therefore the only safe way to build a makefile is to let esql do the linking for you so make that make target look like this: esql -o trtape qtrmain.o qtr_rtape.o qtr_writer.o \\ -lnsl -lsocket -laio -lm Also including the libraries the way you have will suck in the entire library not search it which will result in a larger executable. Now I acknowledge that most ESQL programs suck in most of the library code anyway and shared libaries alleviate this somewhat, but not completely. Art S. Kagel > librarie as needed. My make command creates oodles (a > technical term, I know) of complaints, and they all look > like GLS issues to me. Here is a sample: > % make qtrtape > gcc -o qtrtape qtrmain.o qtr_rtape.o qtr_writer.o \\ > /usr/local/informix/lib/esql/libsql.a \\ > /usr/local/informix/lib/esql/libos.a \\ > /usr/local/informix/lib/libixasf.a \\ > /usr/local/informix/lib/esql/libgen.a \\ > /usr/local/informix/lib/esql/libos.a \\ > /usr/local/informix/lib/esql/libgen.a -lnsl -lsocket -laio -lm > Undefined first referenced > symbol in file > gl_full_mbschr /usr/local/informix/lib/libixasf.a(driver.o) > gl_lc_spec2lc_fname /usr/local/informix/lib/esql/libgen.a(initgls.o) > > and it goes on from there. TIA.