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: Help! I can't link Pro-C files under 7.3.2

Re: Help! I can't link Pro-C files under 7.3.2

From: John Hough <q6y_at_ornl.gov>
Date: 1997/02/20
Message-ID: <330C9834.1199@ornl.gov>#1/1

Ken Frank wrote:
>
> I am trying to compile some C programs which use embedded SQL,
> but am not having any luck getting anything to link. I am doing this
> on an RS6000 (AIX 4.1.5) and Oracle 7.3.2.
>
> I'm able to precompile (with "proc") fine, but am unable to figure out
> what libraries I need to link against.
>
> Here's what my C-Compile command looks like:
>
> cc $FILE.c -o $FILE.exe -DUNIX -DAIX -DORACLE \
> -I$MY_INCL_DIR \
> -lc -lm \
> -L$MY_LIB_DIR -lmylib \
> -L$ORACLE_HOME/lib \
> -lsql -lsqlnet -lnlsrtl3 -lc3v6 -lcore3 -lld -lxa
>
> However, compile fails at link-time with these errors:
>
> ld: 0711-317 ERROR: Undefined symbol: .upih2o
> ld: 0711-317 ERROR: Undefined symbol: .upiico
> ld: 0711-317 ERROR: Undefined symbol: .upipi
> [about 40 lines snipped]
> ld: 0711-317 ERROR: Undefined symbol: .upihmi
> ld: 0711-317 ERROR: Undefined symbol: .upidsc
> ld: 0711-317 ERROR: Undefined symbol: .kpurpc
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
>
> I've searched every ".a" file in $ORACLE_HOME/lib and cannot
> find ANY of these symbols ("grep", and "ar -tv | grep"). I've
> also seen mention of a "-lora", but we don't have any files
> ANYWHERE called "libora.a".
>
> Forgive my cluelessness, but I don't have any manuals, and I'm
> used to Ingres (cc $FILE.c -L$ING_LIB_DIR -lingres -lc -lm), and
> Oracle's libraries have me completely confused! The "demo"
> proc.mk file didn't enlighten me any, either.
>
> Thanks in advance,
> Ken Frank
> ken_at_mn.csoft.com

Ken:

In your $ORACLE_HOME/proc/demo

directory you will find some sample programs and a file proc.mk that should be used to build exes in your version of oracle on your operating system.

I have copied the header to this file below:

cosdev$ more proc.mk
#
# $Header: proc.mk.pp 1.18 95/01/18 04:26:41 pkatoch Osd<unix> $ proc.mk.pp

#
#
# proc.mk - Command file for "make" to compile and load Pro*C 2.0
programs.
#
# Usage to build any program:
#       make -f proc.mk EXE=xyz OBJS="a.o b.o c.o"
#
# Special syntax to link demo program:
#       make -f proc.mk sample1
#
# Special syntax to link and install proc executable:
#       make -f proc.mk install
#
# NOTE:   ORACLE_HOME must be either:
#               . set in the user's environment
#               . passed in on the command line
#               . defined in a modified version of this makefile
#
# Pro*C programs are assumed to have the extension ".pc"
#

copy this file into the directory you are using and try it.

Hope this helps, Received on Thu Feb 20 1997 - 00:00:00 CST

Original text of this message

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