ESQLC CISAM AIX C compiling problem
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
I am in the process of porting all my programs from an old SCO box to a RISC running AIX 4.3.3. I have a file which compiles and links a C programs. The C programs use ESQL (to access a db) and read CISAM files. So I have ESQL C and CIsam. How I used to do it on the sco box is shown below. I'd preprocess using ESQL and then compile and link with CIsam and ESQL C libraries. But now I want to do the same on AIX. I obviously need to replace the -lsco, but with what? I am stumped. I am no C guru! Here is the command file from SCO. (all system files for ESQL and CISAM are in identical directories on the RISC. I also have AIX C). esql -e $1.ec gcc $1.c 'Lusr/informix/lib/esql -L/usr/lib -I/usr/informix/incl/esql -I/use/include -lsql -lgen -los -lsco -lisam -o $1 When I run it on AIX, substituting gcc with xlc and leaving off -lsco I get a number of errors complaining about undefined symbol ._gl_im_x and .gl_is_x and .ASF_x where x is some string of characters. Can anyone offer any clues? Sent via Deja.com http://www.deja.com/ Before you buy.
Kate Juliff wrote:
> I am in the process of porting all my programs from an old SCO box to a
> RISC running AIX 4.3.3.
> I have a file which compiles and links a C programs. The C programs use
> ESQL (to access a db) and read CISAM files. So I have ESQL C and CIsam.
> How I used to do it on the sco box is shown below. I'd preprocess using
> ESQL and then compile and link with CIsam and ESQL C libraries.
> But now I want to do the same on AIX. I obviously need to replace the
> -lsco, but with what? I am stumped. I am no C guru!
> Here is the command file from SCO.
> (all system files for ESQL and CISAM are in identical directories on
> the RISC. I also have AIX C).
> esql -e $1.ec
> gcc $1.c 'Lusr/informix/lib/esql -L/usr/lib -I/usr/informix/incl/esql
> -I/use/include -lsql -lgen -los -lsco -lisam -o $1
> When I run it on AIX, substituting gcc with xlc and leaving off -lsco I
> get a number of errors complaining about undefined symbol ._gl_im_x
> and .gl_is_x
> and .ASF_x
> where x is some string of characters.
> Can anyone offer any clues?
The first step is to always link ESQL/C programs with the ESQL/C
script esql. Anything else causes lost hairs at the next upgrade.
You should probably be using:
INFORMIXC="gcc" esql -o $1 $1.ec -lisam
to compile and link in one swoop. You should be using a sensible
(Bourne, Korn, Born-Again) Shell, of course, and not a C Shell
derivative; the latter won't recognize an environment variable set
on the command line. Using xlc should work fine, too. The undefined
_gl* and _ASF* symbols arise because your ESQL/C library lists are
way out of date -- and the lost hairs arise because the library lists
change at almost any and almost every release.
You'll have to work out what was in -lsco and either rewrite that code
for AIX or use AIX features equivalent to the SCO features.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
#include <disclaimer.h>