sqlcxt() sqlglm() not found - my experience about it

From: Jerry Perng <jerryperng_at_taiwan.com>
Date: 8 Jan 2003 19:42:52 -0800
Message-ID: <1ca90a63.0301081942.3b05a0bb_at_posting.google.com>


guys,

many people encounter following errors in "make .pc into executable": (especially in non-Linux Unix platform)

   ld: 0711-317 ERROR: Undefined symbol: .sqlcxt    ld: 0711-317 ERROR: Undefined symbol: .sqlglm

they are often adviced to copy the sample .mk in $ORACLE_HOME/precomp/demo/proc/ and cut it to fit into need.

my experiences to solve it are:
(AIX 5.1 as Oracle 9.2.0 client)
1. xlc:

   -c(compile) and -o(link) must both use the same bit-mode.    for example:

     xlc -q64 -c vs. xlc -q64 -o  --------> 64-bit applied
     xlc -c      vs. xlc -o --------------> 32-bit applied (default)
   if compile and link do not use the same bit-mode, following err occurs:

---> XCOFF32/XCOFF64 error

2. library:

   the (target) .o and referenced .a must also use the same bit-mode.    if they do not use the same bit-mode, the very MISLEADING error message    is displayed. for example:

       aa.o calls sub(). [32-bit]
       sub() body is in libutil.a. [64-bit]

---> ld complains "sub() not found" in linking because
32-bit function call:sub() is DIFFERENT from 64-bit function body:sub() (it won't display "XCOFF32/XCOFF64" err)

3. oracle library:

   be careful in choosing oracle lib in editing .mk:

      $ORACLE_HOME/lib/*.a ---> 64-bit  (default)
      $ORACLE_HOME/lib32/*.a ---> 32-bit
   that is, (target) .o and oracle lib must also use the same bit-mode, or    the bit-mode inconsistency will still occur (eg., sqlcxt() not found !!!).

   if above rules are satisfied you can directly copy your favor .mk    (eg., from linux platform) into, for example, AIX 5.1 and modify it to fit    your need.
   (no need to copy the verbose sample .mk in $ORACLE_HOME/precomp/demo !)

   wish them helpful in "make .pc into executable" !

Jerry Perng, Received on Thu Jan 09 2003 - 04:42:52 CET

Original text of this message