- 论坛徽章:
- 0
|
我写个OCI测试程序可编译没问题了,连接的时候报错误:
g++ -g -o ./Ocitest -I/home/dbstudy/src/Include -I/oracle/product/10.2.0/precomp/public -I/oracle/product/10.2.0/rdbms/demo -I/oracle/product/10.2.0/rdbms/public -I/oracle/product/10.2.0/network/public -I/oracle/product/10.2.0/rdbms/public mainctrl.o /home/dbstudy/lib/liboci.a -L/oracle/product/10.2.0/lib -lclntsh -Lpath
/home/dbstudy/lib/liboci.a(OciDatabase.o)(.text+0x384): In function `COciDatabase::Connect(char const*)':
/home/dbstudy/src/Src/OciDatabase.cpp:100: undefined reference to `orlon(cda_def*, unsigned char*, unsigned char*, int, unsigned char*, int, int)'
我的makefile:
USERLIB= $(HOME)/lib/liboci.a
INC=-I$(HOME)/src/Include \
-I$(ORACLE_HOME)/precomp/public \
-I$(ORACLE_HOME)/rdbms/demo \
-I$(ORACLE_HOME)/rdbms/public \
-I$(ORACLE_HOME)/network/public \
-I$(ORACLE_HOME)/rdbms/public
CC = g++
OBJS = mainctrl.o
.SUFFIXES: .cpp .c
all: Ocitest
Ocitest: $(OBJS)
$(CC) -g -o ./Ocitest $(INC) $(OBJS) $(USERLIB) -L$(ORACLE_HOME)/lib -lclntsh -Lpath
#.cpp.o:
# $(CC) -c -g -o $@ $< $(INC) $(USERLIB)
#
.pc.C:
$(PROC) $<
.cpp.o:
$(CC) -c -g $< $(INC) $(USERLIB)
.c.o:
$(CC) -c -g -o $@ $< $(INC) $(USERLIB)
clean:
rm -rf *.o
liboci.a是我已经编译好的OCI库.
请问是什么问题? |
|