Undefined Symbol Error [message #171589] |
Wed, 10 May 2006 08:37 |
mhenderson
Messages: 15 Registered: May 2006
|
Junior Member |
|
|
Hello,
I am trying to compile using a proc.mk file that I will list at the bottom. I compiled with success, then when I added code to connect to the DB, I receive this error:
Undefined first referenced
symbol in file
sqlcxt
I have searched around the forums and see to check the $ORACLE_HOME/precomp/lib, but I am not sure what I am looking for there, there is no sqlcxt.so file. Does this have to do with libraries, or the fact that I am getting an error trying to connect? Any help would be great.
proc.mk
#
# $Header: proc.mk.pp 1.17 94/10/03 10:38:51 pluong 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"
#
SHELL=/bin/ksh
ORACLE_HOME=/u01/app/oracle/product/9.2.0.6
LIBHOME=$(ORACLE_HOME)/lib
I_SYM= -I
CC=gcc
CFLAGS=-g
COMPOBJ=$(ORACLE_HOME)/lib
COMPOBJS=$(COMPOBJ)/crti.o $(COMPOBJ)/crt1.o $(COMPOBJ)/__fstd.o
LDSTRING= -Y P,$(LD_LIBRARY_PATH):/usr/ccs/lib:/usr/lib -Qy -lc $(COMPOBJ)/crtn.o
CC= ld -dy $(COMPOBJS)
ASFLAGS=-P
RCC=gcc -I. -O
CFLAGS=
LDFLAGS=-L$(LIBHOME)
ARLOCAL=
AR=ar $(ARLOCAL)
ARCREATE=ar cr$(ARLOCAL)
ARDELETE=ar d$(ARLOCAL)
ARREPLACE=ar r$(ARLOCAL)
ECHO=$(ORACLE_HOME)/bin/echodo
OTHERLIBS=`cat $(ORACLE_HOME)/lib/sysliblist` $(MLSLIBS) $(LDSTRING)
LLIBPSO=
LLIBPSO=-lstublm
XLIBHOME = /usr/lib
MOTIFLIBHOME = /usr/lib
MOTIFLIBS = -L$(MOTIFLIBHOME) -lXm -L$(XLIBHOME) -lXt -lX11 -lm
MOTIFLIBS = -L$(MOTIFLIBHOME) -lXm -lgen -L$(XLIBHOME) -lXt -lX11 -lw -lm
CLIBS=$(OTHERLIBS)
SO=a
NLSRTLHOME= $(SRCHOME)/nlsrtl23
NLSRTLLIB= -lnlsrtl
LIBNLSRTL= $(LIBHOME)/libnlsrtl.a
LLIBNLSRTL=-lnlsrtl
NLSRTLINC= $(I_SYM)$(NLSRTLHOME)/oracore/public
NLSRTLPUBLIC= $(I_SYM)$(NLSRTLHOME)/public $(STDINCLUDE)
COREHOME= $(SRCHOME)/oracore
LIBCORE= $(LIBHOME)/libcore.$(SO)
LIBCV6= $(LIBHOME)/libcv6.$(SO)
LLIBCORE= -lcore
LLIBCV6= -lcv6
CORELIBD= $(LIBNLSRTL) $(LIBCV6) $(LIBCORE)
CORELIBS= $(LLIBNLSRTL) $(LLIBCV6) $(LLIBCORE) $(LLIBNLSRTL) $(LLIBCV6) $(LLIBCORE)
LIBNETWORK= $(LIBHOME)/libnetwork.a
NTCONTAB= $(LIBHOME)/ntcontab.o
TNSLIBS= -lnetwork
TNSLIBD= $(LIBNETWORK)
LIBNETV2= $(LIBHOME)/libnetv2.a
NETV2LIBS= -lnetv2 $(TNSLIBS)
NETV2LIBD= $(LIBNETV2) $(TNSLIBD)
LIBNSG= $(LIBHOME)/libnsg.a
LLIBNSG= -lnsg
NSGLIBS= $(LLIBNSG)
NSGLIBD= $(LIBNSG)
OSNTABST= $(LIBHOME)/osntabst.o
LIBSQLNET= $(LIBHOME)/libsqlnet.a
SQLNETLIBS= -lsqlnet
LIBPLS= $(LIBHOME)/libpls.a
LLIBPLS= -lpls
LIBTK2C= $(LIBHOME)/libtk2c.a
LLIBTK2C= -ltk2c
LIBTK2M= $(LIBHOME)/libtk2m.a
LLIBTK2M= -ltk2m
LIBTK2P= $(LIBHOME)/libtk2p.a
LLIBTK2P= -ltk2p
LIBTK2UC= $(LIBHOME)/libuc.a
LLIBTK2UC= -luc
LIBTK2REM= $(LIBHOME)/librem.a
LLIBTK2REM= -lrem
LIBTK2ROS= $(LIBHOME)/libros.a
LLIBTK2ROS= -lros
LIBTK2OT= $(LIBHOME)/libot.a
LLIBTK2OT= -lot
LIBTK2OTX= $(LIBHOME)/libotx.a
LLIBTK2OTX= -lotx
LIBTK2UT= $(LIBHOME)/libut.a
LLIBTK2UT= -lut
LIBTK2SL= $(LIBHOME)/libsl.a
LLIBTK2SL= -lsl
LIBTK2RE= $(LIBHOME)/libre.a
LLIBTK2RE= -lre
TK2UICLIBD= $(LIBTK2RE) $(LIBTK2UC) $(LIBTK2C) $(LIBTK2OT) $(LIBTK2REM) $(LIBTK2ROS) $(LIBTK2P) $(LIBTK2UT) $(LIBTK2SL)
TK2UICLIBS= $(DYNAMIC_ON_TK2) $(LLIBTK2SL) $(LLIBTK2RE) $(LLIBTK2UC) $(LLIBTK2C) $(LLIBTK2OT) $(LLIBTK2RE) $(LLIBTK2REM) $(LLIBTK2ROS) $(LLIBTK2C) $(LLIBTK2P) $(LLIBTK2C) $(LLIBTK2P) -lm $(LLIBTK2REM) $(LLIBTK2C) $(LLIBTK2OT) $(LLIBTK2UT) $(LLIBTK2UC) $(LLIBTK2SL) $(LLIBTK2C) $(DYNAMIC_OFF_TK2)
TK2UIMLIBD= $(LIBTK2OT) $(LIBTK2RE) $(LIBTK2UC) $(LIBTK2REM) $(LIBTK2ROS) $(LIBTK2M) $(LIBTK2P) $(LIBTK2UT) $(LIBTK2SL)
TK2UIMLIBS= $(DYNAMIC_ON_TK2) $(LLIBTK2OT) $(LLIBTK2RE) $(LLIBTK2UC) $(LLIBTK2REM) $(LLIBTK2ROS) $(LLIBTK2M) $(LLIBTK2P) $(LLIBTK2M) $(LLIBTK2P) $(LLIBTK2M) $(LLIBTK2OT) $(LLIBTK2UT) $(LLIBTK2SL) $(DYNAMIC_OFF_TK2)
PLSPECFILES=
LIBOCIC= $(LIBHOME)/libocic.a
LLIBOCIC= -locic
TTLIBD= $(NETLIBD) $(LIBORA) $(CORELIBD)
STLIBDNOPLS= $(OSNTABST) $(CONFIG) $(CORELIBD) $(NETLIBD) $(RDBMSLIBDNOPLS)
STLIBD= $(OSNTABST) $(CONFIG) $(CORELIBD) $(NETLIBD) $(RDBMSLIBD)
STLIBSNOPLS= $(OSNTABST) $(CONFIG) $(RDBMSLIBSNOPLS) $(RDBMSLIBSNOPLS) $(PLSPECFILES) $(SQLNETLIBS) $(LLIBORA) $(CORELIBS) $(LLIBPSO) $(LDLIBS) $(CLIBS)
STLIBS= $(OSNTABST) $(CONFIG) $(RDBMSLIBS) $(RDBMSLIBS) $(PLSPECFILES) $(SQLNETLIBS) $(LLIBORA) $(CORELIBS) $(LLIBPSO) $(LDLIBS) $(CLIBS)
LLIBNETV2= -lnetv2
LLIBNETWORK= -lnetwork
CONFIG= $(LIBHOME)/config.o
OPIMAI= $(LIBHOME)/opimai.o
LIBORA= $(LIBHOME)/libora.a
LIBKNL= $(LIBHOME)/libknl.a
LIBKNLOPT= $(LIBHOME)/libknlopt.a
LLIBORA= -lora
LLIBKNL= -lknl
LLIBKNLOPT= -lknlopt
RDBMSLIBDNOPLS= $(LIBORA) $(LIBKNLOPT) $(LIBKNL)
RDBMSLIBD= $(LIBORA) $(LIBKNLOPT) $(LIBPLS) $(LIBKNL)
RDBMSLIBSNOPLS= $(LLIBORA) $(LLIBKNLOPT) $(LLIBKNL)
RDBMSLIBS= $(LLIBORA) $(LLIBKNLOPT) $(LLIBPLS) $(LLIBKNL)
LIBSOSD=
LLIBSOSD=
LIBPCORE=$(LIBHOME)/libpcore.a
LLIBPCORE= -lpcore
LIBCGEN= $(LIBHOME)/pdc.o
LIBFORGEN= $(LIBHOME)/pdf.o
LIBCOBGEN= $(LIBHOME)/pdb.o
LIBPASGEN= $(LIBHOME)/pdp.o
LIBADAGEN= $(LIBHOME)/pda.o
LIBOSDGEN= $(LIBHOME)/pds.o
CODEGENHOME= $(SRCHOME)/codegen
LIBSLAX=$(LIBHOME)/pxslax.o
SLAX=/usr/local/slax/newsx
.y.c:
$(SLAX) -p -d -v $*.y
SQLHOME= $(ORACLE_HOME)/sqllib
SQLPUBLIC=$(I_SYM)$(SQLHOME)/public
LIBSQL= $(LIBHOME)/libsql.a
LIBPROC20=$(LIBHOME)/libproc.a
LLIBPROC20= -lproc
LIBPRO= $(LIBPROC20)
LLIBPRO= $(LLIBPROC20)
PROC=$(ORACLE_HOME)/bin/proc
#
# Redefining CC and OTHERLIBS - problem with LDSTRING and MTS / JATIN/HARISH
#
CC= ld -dy $(COMPOBJS) $(LDSTRING)
OTHERLIBS=`cat $(ORACLE_HOME)/lib/sysliblist` $(MLSLIBS)
CFLAGS=
PROCOBJS=$(ORACLE_HOME)/proc/lib/main.o \
$(ORACLE_HOME)/proc/lib/pcdsfv.o \
$(ORACLE_HOME)/proc/lib/pcdlut.o
PROCPLSFLAGS= SQLCHECK=SEMANTICS userid=username/password
all: build
# Rule to compile any program (specify EXE= and OBJS= on command line)
build: $(OBJS)
$(RCC) $(LDFLAGS) -o $(EXE) $(OBJS) $(PROLDLIBS)
# Suffix rules
.SUFFIXES: .exe .o .c .pc
.pc.c:
$(PROC) $(PROFLAGS) iname=$*.pc
.pc.o:
$(PROC) $(PROFLAGS) iname=$*.pc
$(RCC) $(CFLAGS) $(SQLPUBLIC) -Wall -c $*.c
.c.o:
$(RCC) $(CFLAGS) $(SQLPUBLIC) -Wall -c $*.c
LIBDIR= $(ORACLE_HOME)/proc/lib
DEMODIR= $(ORACLE_HOME)/proc/demo
install_files:
-rm -f $(DEMODIR)/proc.mk
-ln $(LIBDIR)/proc.mk $(DEMODIR)/proc.mk
# Rules to relink the proc executable
install: clean proc
-chmod 755 $(ORACLE_HOME)/bin/proc
-mv proc $(ORACLE_HOME)/bin/proc
-chmod 755 $(ORACLE_HOME)/bin/proc
clean:
-rm -f proc
proc:
@$(ECHO) $(CC) $(LDFLAGS) -o proc $(PROCOBJS) \
$(LLIBPROC20) $(LIBCGEN) $(LLIBPLS) $(LIBOSDGEN) $(LIBSLAX) \
$(LLIBPCORE) $(LLIBPLS) $(LLIBORA) $(LLIBPLS) $(TTLIBS) -lm
|
|
|