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 -> newbie question - error compiling pro*c

newbie question - error compiling pro*c

From: Huntress <kaeli96_at_yahoo.com>
Date: Fri, 17 Aug 2001 07:42:12 -0500
Message-ID: <3B7D1124.466B2B06@yahoo.com>


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



cc testQuery.c -L/epd_fs/ora1/app/oracle/product/8.1.6/lib/ -L -L `cat /epd_fs/ora1/app/oracle/product/8.1.6/lib/syslib list` -R /epd_fs/ora1/app/oracle/product/8.1.6/lib -laio -lm -o
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...



# Makefile for testQuery.pc

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

$(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo
$(I_SYM)$(PLSQLHOME)p

ublic $(I_SYM)$(NETWORKHOME)public
INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public

$(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo
$(I_SYM)$(PLSQLHOME)p

ublic $(I_SYM)$(NETWORKHOME)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

Original text of this message

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