gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Error with OC 0.33 and linking to Oracle 9i


From: schlehuberc
Subject: Re: [open-cobol-list] Error with OC 0.33 and linking to Oracle 9i
Date: Tue, 22 May 2007 12:16:48 -0500


Sergey,
Thank you for your response.  The -fstatic-call was the key.


For the executable, I had to add the -fstatic-call to the flags to get the SQL??? functions to be static.  

export COB_BIGENDIAN="yes"
export COB_CC="gcc -fPIC -maix64"
export COB_CFLAGS=" -I$localpath/include -L$localpath/lib "
export COB_LIBS="-L$localpath/lib -lcob -lm -lgmp -ldl"
export COB_CONFIG_DIR="$localpath/share/open-cobol/config"
export LD_LIBRARY_PATH="$localpath/lib:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$localpath/lib:$DYLD_LIBRARY_PATH"
export SHLIB_PATH="$localpath/lib:$SHLIB_PATH"
export LIBPATH="$localpath/lib:$LIBPATH"

/public/dev/pm/jag/opencobol/local/bin/cobc -x -std=mvs -debug -Wall -v -save-temps $1.cob -fstatic-call $ORACLE_HOME/precomp/lib/cobsqlintf.o -L$ORACLE_HOME/lib -lclntsh

preprocessing CZIVALID.cob into CZIVALID.i
CZIVALID.cob:3: Warning: AUTHOR is obsolete in IBM COBOL for MVS & VM
translating CZIVALID.i into CZIVALID.c
CZIVALID.cob:37: Warning: 'GLOBAL' not implemented
CZIVALID.cob:41: Warning: 'GLOBAL' not implemented
CZIVALID.cob:44: Warning: 'GLOBAL' not implemented
CZIVALID.cob:78: Warning: 'GLOBAL' not implemented
CZIVALID.cob:90: Warning: 'GLOBAL' not implemented
CZIVALID.cob:340: Warning: 'GLOBAL' not implemented
CZIVALID.cob: In paragraph '9000-TERM':
CZIVALID.cob:822: Warning: IF statement not terminated by END-IF
gcc -fPIC -maix64 -pipe -c  -I/public/dev/pm/jag/opencobol/local/include -L/public/dev/pm/jag/opencobol/local/lib  -fsigned-char -o
CZIVALID.o CZIVALID.c
gcc -fPIC -maix64 -pipe   -o CZIVALID CZIVALID.o /db01/oracle/92/precomp/lib/cobsqlintf.o  -L/public/dev/pm/jag/opencobol/local/lib -lcob -lm -lgmp -ldl -L/db01/oracle/92/lib -lclntsh

For the module, I had to put the $ORACLE_HOME/precomp/lib/cobsqlintf.o -L$ORACLE_HOME/lib -lclntsh statements in the COB_CFLAGS environment variable.  With the statements on the command line, cobc did not get the statements included in the gcc command.

export COB_BIGENDIAN="yes"
export COB_CC="gcc -fPIC -maix64"
export COB_CFLAGS=" -I$localpath/include -L$localpath/lib -lcob -lm -lgmp -ldl $ORACLE_HOME/precomp/lib/cobsqlintf.o -L$ORACLE_HOME/lib -lclntsh"
export COB_LIBS="-L$localpath/lib"
export COB_CONFIG_DIR="$localpath/share/open-cobol/config"
export LD_LIBRARY_PATH="$localpath/lib:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$localpath/lib:$DYLD_LIBRARY_PATH"
export SHLIB_PATH="$localpath/lib:$SHLIB_PATH"
export LIBPATH="$localpath/lib:$LIBPATH"

/public/dev/pm/jag/opencobol/local/bin/cobc -m -std=mvs -debug -Wall -v -save-temps -fstatic-call $1.cob


preprocessing CZIVALID.cob into CZIVALID.i
CZIVALID.cob:3: Warning: AUTHOR is obsolete in IBM COBOL for MVS & VM
translating CZIVALID.i into CZIVALID.c
CZIVALID.cob:37: Warning: 'GLOBAL' not implemented
CZIVALID.cob:41: Warning: 'GLOBAL' not implemented
CZIVALID.cob:44: Warning: 'GLOBAL' not implemented
CZIVALID.cob:78: Warning: 'GLOBAL' not implemented
CZIVALID.cob:90: Warning: 'GLOBAL' not implemented
CZIVALID.cob:340: Warning: 'GLOBAL' not implemented
CZIVALID.cob: In paragraph '9000-TERM':
CZIVALID.cob:823: Warning: IF statement not terminated by END-IF
gcc -fPIC -maix64 -pipe  -I/public/dev/pm/jag/opencobol/local/include -L/public/dev/pm/jag/opencobol/local/lib -lcob -lm -lgmp -ldl
/db01/oracle/92/precomp/lib/cobsqlintf.o -L/db01/oracle/92/lib -lclntsh -fsigned-char -shared   -DPIC  -o CZIVALID.so CZIVALID.c


I ended up not having to include the oracle modules in the cobcrun executable.

Thank you for helping me to end my week and half long struggle.
Cris Schlehuber
reply via email to

[Prev in Thread] Current Thread [Next in Thread]