Re: PRO*C question

From: Alan B. Evans <aevans_at_kaiwan.com>
Date: 12 Aug 1994 06:45:17 -0700
Message-ID: <32fudd$rmj_at_kaiwan.kaiwan.com>


Jodi Showers (jshowers_at_cmi.on.ca) wuz sayin:
: In article <31o9il$t3j_at_news.nofc.forestry.ca>, rsuddaby_at_nofc.forestry.ca wrote:
 

: > In article bi3_at_apakabar.cc.columbia.edu, sb63_at_namaste.cc.columbia.edu
 (Semyon Basin) writes:
: > >
: > >Hi, Everyone!
: >
: > [snip]
: >
: > >ld:
: > >Undefined:
: > >sqlcex
: > >
: > >If any kind soul have an idea - please help me.
: > >George.
: >
: >
: > You should have the following line somewhere in your source code:
: >
: > EXEC SQL INCLUDE sqlca;
: >
: > sqlca is a structure used by ORACLE to hold runtime info about any
: > SQL statement being executed by your process. This info includes
: > error codes and other processing information. (However... it does
: > not have a variable 'sqlcex', or at least this one is not mentioned
: > in the manual). Try it out and see if this works.
 

: sqlex (if I'm not in left field) is the function that 'executes' an EXEC
: SQL '.....' statement.
: Although you will need to include the sqlca, this will NOT solve your problem.
 

: If you look at the foo.c after the precompile phase, you will find the
: each EXEC SQL statement has
: been replaced with a struct initialization plus a call to sqlcex.
 

: Example
: /* SQL stmt #7
: EXEC SQL COMMIT WORK RELEASE;
: */
: sqlstm.iters = (unsigned short)1;
: sqlstm.offset = (unsigned short)25;
: sqlstm.cud = sqlcud0;
: sqlstm.sqlest = (unsigned char *)&sqlca;
: sqlstm.sqlety = (unsigned short)0;
: sqlcex(&sqlctx, &sqlstm, &sqlfpn);

: And ld: is complaining that the function sqlcex is not found; ie. a
: library reference is missing in
: the makefile. Take a look at $ORACLE_HOME/proc/demo/proc.mk and compare it
: to your make.
 

: if I can help let me know.
 

: Jodi.

You are on the right track. Look at the macro PROLDLIBS in proc.mk. This macro contains all the libraries you need in order to link.

Alan

-- 
You can reach me at _at_ :
Internet : aevans_at_kaiwan.com, aevans_at_free.org, fa996_at_cleveland.freenet.edu
ICBM     :   33 39'     North   Cruise  :   33 39' 37"  North
         :  117 59'     West            :  117 59' 54"  West
Received on Fri Aug 12 1994 - 15:45:17 CEST

Original text of this message