Linker warnings with ESQL/C version 7.31UC3 and GCC 2.8.1
Posted in 1999
Topics: High Availability & Replication, Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Internationalization & Character Sets
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF2229.AD129846 Content-Type: text/plain; charset="iso-8859-1" Hi! I am working on a ESQL/C project using Informix 7.31UC3 with GCC 2.8.1 as the C compiler. When a compile an object I am receiving some error messages from GCC noting that the linker input file is unused since linking is not done (see below). Is there a way to eliminate these messages aside from turning off GCC warnings? Thanks in advance. Thom Warning messages (the same messages appear for each object file): gcc: -lixsql: linker input file unused since linking not done gcc: -lixasf: linker input file unused since linking not done gcc: -lixgen: linker input file unused since linking not done gcc: -lixos: linker input file unused since linking not done gcc: -lixgls: linker input file unused since linking not done gcc: -lnsl: linker input file unused since linking not done gcc: -lsocket: linker input file unused since linking not done gcc: -laio: linker input file unused since linking not done gcc: -lm: linker input file unused since linking not done gcc: /opt/informix/lib/esql/checkapi.o: linker input file unused since linking not done Example of our makefiles: all: foo # Set Compilers ESQL = /opt/informix/bin/esql CC = /opt/gnu/bin/gcc # Set directory variables SRC=$$HOME/rel1/src/ HDR=$$HOME/rel1/hdr/ BIN=$$HOME/rel1/bin/ MAK=$$HOME/rel1/mak/ DIR=$$PWD/ # Define include directory INC=$$HOME/rel1/hdr # Define application name for install, uninstall, purge APP=foo # Import debug environment variable from shell DBG=$$DEBUG # Define suffixes .SUFFIXES : .o .ec ec.o : $(ESQL) -c $*.ec -rm $*.c # Begin program specific definitions foo.o: ../src/foo.ec esql $(DBG) -c $(SRC)foo.ec -I$(INC) foo_stuff.o: ../src/foo_stuff.ec esql $(DBG) -c $(SRC)foo_stuff.ec -I$(INC) foo_rescan.o: ../src/foo_rescan.ec esql $(DBG) -c $(SRC)foo_rescan.ec -I$(INC) foo_requests.o: ../src/foo_requests.ec esql $(DBG) -c $(SRC)foo_requests.ec -I$(INC) foo: foo.o foo_stuff.o foo_requests.o foo_rescan.o esql foo.o foo_stuff.o foo_rescan.o foo_requests.o -o foo # End program specific definitions clean: -rm -f $(DIR)*.c -rm -f $(DIR)*.o purge: -rm -f $(DIR)$(APP) -rm -f $(DIR)*.c -rm -f $(DIR)*.o install: foo cp -f $(DIR)$(APP) $(BIN)$(APP) -rm -f $(DIR)$(APP) -rm -f $(DIR)*.c -rm -f $(DIR)*.o uninstall: -rm -f $(BIN)$(APP) ------_=_NextPart_001_01BF2229.AD129846 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2650.12"> <TITLE>Linker warnings with ESQL/C version 7.31UC3 and GCC = 2.8.1</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>Hi! </FONT> <BR> <FONT SIZE=3D2>I am = working on a ESQL/C project using Informix 7.31UC3 with GCC 2.8.1 as = the C compiler. When a compile an object I am receiving some error = messages from GCC noting that the linker input file is unused since = linking is not done (see below). Is there a way to eliminate these = messages aside from turning off GCC warnings? Thanks in = advance.</FONT></P> <P><FONT SIZE=3D2>Thom</FONT> </P> <P><FONT SIZE=3D2>Warning messages (the same messages appear for each = object file):</FONT> <BR><FONT SIZE=3D2>gcc: -lixsql: linker input file unused since linking = not done</FONT> <BR><FONT SIZE=3D2>gcc: -lixasf: linker input file unused since linking = not done</FONT> <BR><FONT SIZE=3D2>gcc: -lixgen: linker input file unused since linking = not done</FONT> <BR><FONT SIZE=3D2>gcc: -lixos: linker input file unused since linking = not done</FONT> <BR><FONT SIZE=3D2>gcc: -lixgls: linker input file unused since linking = not done</FONT> <BR><FONT SIZE=3D2>gcc: -lnsl: linker input file unused since linking = not done</FONT> <BR><FONT SIZE=3D2>gcc: -lsocket: linker input file unused since = linking not done</FONT> <BR><FONT SIZE=3D2>gcc: -laio: linker input file unused since linking = not done</FONT> <BR><FONT SIZE=3D2>gcc: -lm: linker input file unused since linking not = done</FONT> <BR><FONT SIZE=3D2>gcc: /opt/informix/lib/esql/checkapi.o: linker input = file unused since linking not done</FONT> </P> <P><FONT SIZE=3D2>Example of our makefiles:</FONT> <BR><FONT SIZE=3D2>all: foo</FONT> </P> <P><FONT SIZE=3D2># Set Compilers</FONT> <BR><FONT SIZE=3D2>ESQL =3D = /opt/informix/bin/esql</FONT> <BR><FONT SIZE=3D2>CC =3D = /opt/gnu/bin/gcc</FONT> </P> <P><FONT SIZE=3D2># Set directory variables</FONT> <BR><FONT SIZE=3D2>SRC=3D$$HOME/rel1/src/</FONT> <BR><FONT SIZE=3D2>HDR=3D$$HOME/rel1/hdr/</FONT> <BR><FONT SIZE=3D2>BIN=3D$$HOME/rel1/bin/</FONT> <BR><FONT SIZE=3D2>MAK=3D$$HOME/rel1/mak/</FONT> <BR><FONT SIZE=3D2>DIR=3D$$PWD/</FONT> </P> <P><FONT SIZE=3D2># Define include directory</FONT> <BR><FONT SIZE=3D2>INC=3D$$HOME/rel1/hdr</FONT> </P> <P><FONT SIZE=3D2># Define application name for install, uninstall, = purge</FONT> <BR><FONT SIZE=3D2>APP=3Dfoo</FONT> </P> <P><FONT SIZE=3D2># Import debug environment variable from shell</FONT> <BR><FONT SIZE=3D2>DBG=3D$$DEBUG</FONT> </P> <P><FONT SIZE=3D2># Define suffixes</FONT> <BR><FONT SIZE=3D2>.SUFFIXES : .o .ec</FONT> </P> <P><FONT SIZE=3D2>ec.o :</FONT> <BR> <FONT SIZE=3D2>$(ESQL) = -c $*.ec</FONT> <BR> <FONT SIZE=3D2>-rm = $*.c</FONT> </P> <P><FONT SIZE=3D2># Begin program specific definitions</FONT> <BR><FONT SIZE=3D2>foo.o: ../src/foo.ec</FONT> <BR> <FONT SIZE=3D2>esql = $(DBG) -c $(SRC)foo.ec -I$(INC) </FONT> </P> <P><FONT SIZE=3D2>foo_stuff.o: ../src/foo_stuff.ec</FONT> <BR> <FONT SIZE=3D2>esql = $(DBG) -c $(SRC)foo_stuff.ec -I$(INC) </FONT> </P> <P><FONT SIZE=3D2>foo_rescan.o: ../src/foo_rescan.ec</FONT> <BR> <FONT SIZE=3D2>esql = $(DBG) -c $(SRC)foo_rescan.ec -I$(INC) </FONT> </P> <P><FONT SIZE=3D2>foo_requests.o: ../src/foo_requests.ec</FONT> <BR> <FONT SIZE=3D2>esql = $(DBG) -c $(SRC)foo_requests.ec -I$(INC) </FONT> </P> <P><FONT SIZE=3D2>foo: foo.o foo_stuff.o foo_requests.o foo_rescan.o</FO= NT> <BR> <FONT SIZE=3D2>esql = foo.o foo_stuff.o foo_rescan.o foo_requests.o -o foo</FONT> <BR><FONT SIZE=3D2># End program specific definitions</FONT>@
"Farrell, Thom" wrote: > > Hi! > I am working on a ESQL/C project using Informix 7.31UC3 with GCC > 2.8.1 as the C compiler. When a compile an object I am receiving some error > messages from GCC noting that the linker input file is unused since linking > is not done (see below). Is there a way to eliminate these messages aside > from turning off GCC warnings? Thanks in advance. > > Thom > > Warning messages (the same messages appear for each object file): > gcc: -lixsql: linker input file unused since linking not done > gcc: -lixasf: linker input file unused since linking not done > gcc: -lixgen: linker input file unused since linking not done > gcc: -lixos: linker input file unused since linking not done > gcc: -lixgls: linker input file unused since linking not done > gcc: -lnsl: linker input file unused since linking not done > gcc: -lsocket: linker input file unused since linking not done > gcc: -laio: linker input file unused since linking not done > gcc: -lm: linker input file unused since linking not done > gcc: /opt/informix/lib/esql/checkapi.o: linker input file unused since > linking not done > A. Avoid posting HTML messages. B. Known problem (at least, I know about it and I've complained about it on numerous occasions, and I've supplied the fixed script, and it has not necessarily been fixed in the released software). Basically, the script needs to track whether the '-c' option is passed, and if it is, it should nullify all the library variables. Not hard to do, but a nuisance. I have the impression that I've not seen those errors recently. Now, that might be because I'm using GCC 2.95.1 and maybe it doesn't complain, or because I'm using a patched version of the esql script, or because the esql script for the versions I'm using have finally been fixed. It is only a benign warning. It is a confounded nuisance. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>
On Fri, 29 Oct 1999, Jonathan Leffler wrote: >"Farrell, Thom" wrote: >> I am working on a ESQL/C project using Informix 7.31UC3 with GCC >> 2.8.1 as the C compiler. When a compile an object I am receiving some error >> messages from GCC noting that the linker input file is unused since linking >> is not done (see below). Is there a way to eliminate these messages aside >> from turning off GCC warnings? Thanks in advance. >> >> Warning messages (the same messages appear for each object file): >> gcc: -lixsql: linker input file unused since linking not done >> gcc: -lixasf: linker input file unused since linking not done >> gcc: -lixgen: linker input file unused since linking not done >> gcc: -lixos: linker input file unused since linking not done >> gcc: -lixgls: linker input file unused since linking not done >> gcc: -lnsl: linker input file unused since linking not done >> gcc: -lsocket: linker input file unused since linking not done >> gcc: -laio: linker input file unused since linking not done >> gcc: -lm: linker input file unused since linking not done >> gcc: /opt/informix/lib/esql/checkapi.o: linker input file unused since >> linking not done > >[...] > >B. Known problem (at least, I know about it and I've complained about it on >numerous occasions, and I've supplied the fixed script, and it has not >necessarily been fixed in the released software). Basically, the script needs >to track whether the '-c' option is passed, and if it is, it should nullify all >the library variables. Not hard to do, but a nuisance. I have the impression >that I've not seen those errors recently. Now, that might be because I'm using >GCC 2.95.1 and maybe it doesn't complain, or because I'm using a patched >version of the esql script, or because the esql script for the versions I'm >using have finally been fixed. > >It is only a benign warning. It is a confounded nuisance. Further to this, it appears that the reason I've not been seeing those warnings of late is that the CSDK 2.30 product has finally got the fix in place, on both Unix (Solaris 2.6) and Linux. So, progress has been made -- and it looks virtually identical to the fix I supplied, so they do pay passing attention to me, sometimes. Thom, which version of ESQL/C are you using with your 7.31 IDS? It should be CSDK 2.30 for first choice, if 2.40 is not yet available. If you are using some older version, you should probably upgrade. If you really need to fix your esql script, the code below (the CSDK 2.30 version of esql for Solaris 2.6) is a good guide to what you need to do. Look for NOLINK -- it occurs three times. The same changes can be applied to more or less any version of the script, though the list of library shell variables might change occasionally. Yours, Jonathan Leffler (jleffler@informix.com) #include <disclaimer.h> Guardian of DBD::Informix v0.62 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!" : "@(#): shar.sh,v 2.1 1998/06/02 17:13:43 jleffler Exp $" #! /bin/sh # # This is a shell archive. # Remove everything above this line and run sh on the resulting file. # If this archive is complete, you will see this message at the end: # "All files extracted" # # Created on: Mon Nov 1 16:01:52 PST 1999 # Created by: jleffler at Informix Software Inc. # # Files archived in this archive: # esql # #-------------------- if [ -f esql -a "$1" != "-c" ] then echo shar: esql already exists else echo 'x - esql (14123 characters)' sed -e 's/^X//' >esql <<'SHAR-EOF' X: ' X: ************************************************************************* X: X: INFORMIX SOFTWARE, INC. X: X: PROPRIETARY DATA X: X: THIS DOCUMENT CONTAINS TRADE SECRET DATA WHICH IS THE PROPERTY OF X: INFORMIX SOFTWARE, INC. THIS DOCUMENT IS SUBMITTED TO RECIPIENT IN X: CONFIDENCE. INFORMATION CONTAINED HEREIN MAY NOT BE USED, COPIED OR X: DISCLOSED IN WHOLE OR IN PART EXCEPT AS PERMITTED BY WRITTEN AGREEMENT X: SIGNED BY AN OFFICER OF INFORMIX SOFTWARE, INC. X: X: THIS MATERIAL IS ALSO COPYRIGHTED AS AN UNPUBLISHED WORK UNDER X: SECTIONS 104 AND 408 OF TITLE 17 OF THE UNITED STATES CODE. X: UNAUTHORIZED USE, COPYING OR OTHER REPRODUCTION IS PROHIBITED BY LAW. X: X: X: Title: esql.sh X: Sccsid: @(#)esql.sh 9.14 11/11/93 07:43:13 X: Description: X: Source for shell script for running the ESQL/C preprocessor X: X: ************************************************************************* X: ' XINFDIR=${INFORMIXDIR=/usr/informix} XPREPCC=${INFDIR}/lib/esql/esqlc XCC=${INFORMIXC=cc} XCPP=${INFORMIXCPP=CC} X XCP=${INFORMIXCP="$CC -E -C"} # cpp which runs before esqlc XPROTECT=${INFDIR}/lib/esql/eprotect # make SQL keyword protection XUPROTECT="${INFDIR}/lib/esql/eprotect -u" # undo SQL keyword protection X X X: ' X: INFORMIX Global Language Support extensions X: X: Please set an appropriate value to the CC8BITLEVEL shell variable. X: See guidelines below for specifying appropriate CC8BITLEVEL values. X: ' X XMBFILTER=${INFDIR}/lib/esql/esqlmf XCC8BITLEVEL=${CC8BITLEVEL-0} X X: ' X: ---------------------------------------------------------------------------- X: CC8BITLEVEL Remarks X: ---------------------------------------------------------------------------- X: X: 0 C compiler does not allow 8th bit set bytes in literal X: strings and comments. X: X: 1 C compiler does not allow 8th bit set bytes in literal X: strings. X: X: 2 C compiler allows 8th bit set bytes in literal strings; it X: expects all bytes in a multiple-byte character to have the X: 8th bit set. The compiler complains about literal strings if X: any byte of a multiple-byte character is not 8th bit set. X: X: Compilers on Japanese EUC codeset machines usually exhibit X: this behavior. X: X: For example, the compiler will not allow literal multiple X: byte characters with the bytes (\\), ("), and (%). X: X: 3 C compiler allows 8th bit set bytes in literal strings; it X: does not expect all bytes in a multiple-byte character to X: have the 8th bit set. X: X: Compilers on Japanese Shift-JIS codeset machines exhibit this X: behavior. This also applies to Chinese Shift-Big5 codeset X: C compilers. X: X: For example, the compiler will accept literal multiple byte X: characters with bytes (\\), ("), or (%) as the non-zeroth X: byte of a multibyte character. X: X: ---------------------------------------------------------------------------- X: CC8BITLEVEL Causes $MBFILTER to be invoked as follows: X: ---------------------------------------------------------------------------- X: X:
Related threads
- Conversion to differeent characters sets
- Problem in changing locale via dbexport/dbimport
- RE: openlink error "Unable to load locale categories"