Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to link ProC after proc and cc

How to link ProC after proc and cc

From: Grace Tsai <gtsai_at_bnl.gov>
Date: Wed, 17 Mar 1999 10:47:03 -0500
Message-ID: <36EFCE77.C264CC31@bnl.gov>


I have installed Oracle 8.0.5 in a Solaris 2.6 box.

As usual, I test the ProC by using a small demo program "sample1.pc" which "prompts the user for an employee number, then queries the emp table for the employee's name, salary and commission."

Usually, in Oracle 7.3.2( IRIX or AIX), I use the following three steps to compile/link my ProC program.

step1: proc iname=sample1.pc

=> "sample1.c" will be created

step 2: cc -O -I. -I/<$ORACLE_HOME>/precomp/public -c sample1.c

=> "sample1.o" will be created

step 3: cc -o sample1 sample1.o -L/<$ORACLE_HOME>/lib

=> The executable "sample1" will be created

Now I use the same steps listed above to compile the same "sample1.pc" in Solaris/Oracle8.0.5, I fail in the "step 3".

I got the following messages

                                                   First
  Undefined                              Referenced
    Symbol                                    in file
--------------                         ----------------------
  sqlglm                                    sample1.o
  sqlcxt                                     sample1.o

So, I include more ".a" files after "-I/<$ORACLE_HOME>/lib", e.g., "-lsql" since I know "sqlglm" and "sqlcxt" are both referenced in "libsql.a".
But then, I got a big list of "Undefined symbol"s, totally about 130 lines.

                                                 First
   Undefined                           Referenced
    Symbol                                in file
---------------                     ---------------
 OCITypeVTInsert             <$ORACLE_HOME>/lib/libsql.a(sqlexp.o)
 lmx42b
<$ORACLE_HOME>/lib/libsql.a(sqlu2s.o)
  ..
  ..

Can anybody tell me how to solve this problem? Thanks very much in advance.

Grace Tsai
Brookhaven National Lab Received on Wed Mar 17 1999 - 09:47:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US