isam.h
Posted in 1999
Topics: General Discussion
I'm trying to create a customised runner to debug some programs. We use lots of 'C' modules which all work okay. However one of the C modules has calls to isread, isopen, isstart. The module includes isam.h and isam.h definitely does exist in /usr/include. My problem is that when I try to do a cfgldb and link all my C modules together, I get Undefined Symbols for each occurrence of the above calls. This is not a problem when I compile a normal executable only when I use cfgldb, cfglgo. The problems seems to be when the modules are linked together, It is the ld command that complains. Please advise if you can help or point me in the right direction. Many Regards Rekaish rekaishb@compans.com
Rekaish Bhardwaj wrote: > > I'm trying to create a customised runner to debug some programs. > We use lots of 'C' modules which all work okay. > However one of the C modules has calls to isread, isopen, isstart. The > module includes isam.h > and isam.h definitely does exist in /usr/include. OK; and where does libisam.a exist? /usr/lib? Without that too, you have problems. > My problem is that when I try to do a cfgldb and link all my C modules > together, I get > Undefined Symbols for each occurrence of the above calls. Did you list -lisam on the link line? > This is not a problem when I compile a normal executable only > when I use > cfgldb, cfglgo. Even if you get -lisam into the link line, it may not work. It isn't really recommended to try using C-ISAM calls in an ESQL/C application, and fglgo and fgldb are basically big ESQL/C programs. > The problems seems to be when the modules are linked together, > It is the ld command that complains. > > Please advise if you can help or point me in the right direction. > > Many Regards > Rekaish > > rekaishb@compans.com -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Jonathan Leffler wrote in message <3695A727.2DA4@earthlink.net>... >Rekaish Bhardwaj wrote: >> >> I'm trying to create a customised runner to debug some programs. >> We use lots of 'C' modules which all work okay. >> However one of the C modules has calls to isread, isopen, isstart. The >> module includes isam.h >> and isam.h definitely does exist in /usr/include. > >OK; and where does libisam.a exist? /usr/lib? Without that too, >you have problems. > >> My problem is that when I try to do a cfgldb and link all my C modules >> together, I get >> Undefined Symbols for each occurrence of the above calls. > >Did you list -lisam on the link line? > >> This is not a problem when I compile a normal executable only >> when I use >> cfgldb, cfglgo. > >Even if you get -lisam into the link line, it may not work. >It isn't really recommended to try using C-ISAM calls in an >ESQL/C application, and fglgo and fgldb are basically big ESQL/C >programs. > OK, maybe Informix and others does not recommend this !! We have been doing this for the last 8 year with no problems. First of all you do need the -lisam option on c4gl or what ever you use. Then, because Informix's c4gl "makefile" contains an "error", thios may give you other problems. c4gl takes all the "extra" arguments you give it (-lisam) and stuff it in before Informix's own libraries (for 4GL, gls etc). This may give an error on several gls functions, depending on which 4GL version you are running. Now, the smartes way to correct this problem is to change the c4gl this way. 1. DO NOT use -lisam when compiling/buil'ding 2. Alter $INFORMIXDIR/bin/c4gl to always include -lisam on the actual command line that it executes. (line around bottom, looking like "$INFORMIXC -D........" by adding -lisam at END of line. This will assure that you always include isam library after all other Informix 4GL libraries. >> The problems seems to be when the modules are linked together, >> It is the ld command that complains. >> >> Please advise if you can help or point me in the right direction. >> >> Many Regards >> Rekaish >> >> rekaishb@compans.com > >-- >Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) >Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN >#include <disclaimer.h> >