当前位置: 技术问答>linux和unix
HP 64位机器上OCI程序编译报错
来源: 互联网 发布时间:2015-05-17
本文导语: 我在HP的64位机器上编译OCI程序,提示如下错误 /usr/ccs/bin/ld: /ora9i/app/oracle/product/9i/lib/libclntsh.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link. 如果makefile加入CC=cc +O2 -z -DHPUX +DA2.0W +DS2.0 -DSS_64BIT_SERVER则 ...
我在HP的64位机器上编译OCI程序,提示如下错误
/usr/ccs/bin/ld: /ora9i/app/oracle/product/9i/lib/libclntsh.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.
如果makefile加入CC=cc +O2 -z -DHPUX +DA2.0W +DS2.0 -DSS_64BIT_SERVER则
则程序执行 OCIServerAttach 时发生coredump
请各位高手告知如何解决
makefile 如下
include $(ORACLE_HOME)/rdbms/lib/env_rdbms.mk
INCLUDE=-I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(HOME)/include
OCISHAREDLIBS=$(LLIBCLNTSH)
DEFS=
LIBPATH = -L. -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib
MAKEFILE = makefile
..SUFFIXES: .o .cob .for .cc
CC=cc +O2 -z -DHPUX +DA2.0W +DS2.0 -DSS_64BIT_SERVER
COMPILE = $(CC) $(INCLUDE)
MAKEEXE = $(CC) $(LIBPATH) $(OCISHAREDLIBS)
all: test
test: test.o
$(MAKEEXE) test.o -o $@
.c.o:
$(COMPILE) -c $
/usr/ccs/bin/ld: /ora9i/app/oracle/product/9i/lib/libclntsh.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.
如果makefile加入CC=cc +O2 -z -DHPUX +DA2.0W +DS2.0 -DSS_64BIT_SERVER则
则程序执行 OCIServerAttach 时发生coredump
请各位高手告知如何解决
makefile 如下
include $(ORACLE_HOME)/rdbms/lib/env_rdbms.mk
INCLUDE=-I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(HOME)/include
OCISHAREDLIBS=$(LLIBCLNTSH)
DEFS=
LIBPATH = -L. -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib
MAKEFILE = makefile
..SUFFIXES: .o .cob .for .cc
CC=cc +O2 -z -DHPUX +DA2.0W +DS2.0 -DSS_64BIT_SERVER
COMPILE = $(CC) $(INCLUDE)
MAKEEXE = $(CC) $(LIBPATH) $(OCISHAREDLIBS)
all: test
test: test.o
$(MAKEEXE) test.o -o $@
.c.o:
$(COMPILE) -c $