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 -> Re: How to link ProC after proc and cc

Re: How to link ProC after proc and cc

From: Pinwu Xu <pxu_at_perigee.net>
Date: Wed, 17 Mar 1999 20:48:51 -0500
Message-ID: <36F05B82.C848342F@perigee.net>


Grace Tsai wrote:

> 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

The easiest solution would be to follow the demo_proc.mk in the $ORACLE_HOME/precomp/demo/proc
directory, you could even compile your program using

make -f /path/to/demo_proc.mk your_source_file_name_w/o_c_postfix

Hope this helps.

Pinwu

--


| Pinwu Xu                                                          |
|                                                                   |
| 6201 Dove Tree Ln., #B       email: pxu_at_perigee.net               |
| Charlotte, NC 28213                 pinwu_xu_at_hotmail.com          |
| 704-921-0438(H)                                                   |
| 704-383-5093(O)              http://www.perigee.net/~pxu          |
=====================================================================



Received on Wed Mar 17 1999 - 19:48:51 CST

Original text of this message

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