Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> newbie question - error compiling pro*c
Hi all,
This is my first attempt at a pro*c application. It's just a little test
program, but I can't even get it to compile. I have a makefile. The
program compiles to the linker, but the linker says
testQuery Undefined first referenced symbol in file sqlglm testQuery.o sqlcxt testQuery.o ld: fatal: Symbol referencing errors. No output written to testQuery *** Error code 1 make: Fatal error: Command failed for target `testQuery.o' ----------------------------------------------------------------------------
These symbols were built in by the pro*c step from EXEC SQL calls. So why can't the linker find them?
My makefile...
include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
SRC=testQuery.pc
#
clean:
rm -f testQuery.o testQuery.c testQuery.d
all: testQuery
testQuery: testQuery.o
testQuery.o: testQuery.c
$(CC) testQuery.c -L$(LIBHOME) -L$(PRODLIBS) -L$(LDLIBS) -o testQuery
testQuery.c: testQuery.pc
$(PROC) CODE=ANSI_C iname=testQuery.pc
TTFLAGS=$(PCCFLAGS)
CLIBS= $(TTLIBS_QA) $(LDLIBS)
PRODUCT_LIBHOME=$(ORACLE_HOME)/lib/
MAKEFILE=~myHome/testFiles/Makefile
PROCPLSFLAGS= sqlcheck=full userid=$(USERID)
PROCPPFLAGS= code=cpp $(CPLUS_SYS_INCLUDE)
USERID=myUsername/myPassword
NETWORKHOME=$(ORACLE_HOME)/network/
PLSQLHOME=$(ORACLE_HOME)/plsql/
INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public
INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public
The MAKEFILE and USERID vars have been edited for security, but they are
both correct in the real file.
Any ideas what I'm doing wrong?
Thanks! Received on Fri Aug 17 2001 - 07:42:12 CDT
![]() |
![]() |