环境:oracle10g(10.2)和redhat4
1、必须的几个文件gcc和g++的
compat-gcc-7.3-2.96.118.i386.rpm
compat-gcc-c++-7.3-2.96.118.i386.rpm
compat-libstdc++-7.3-2.96.118.i386.rpm
compat-libstdc++-devel-7.3-2.96.118.i386.rpm
用rpm -ivh安装完上列包后建立以下链接
ln -s g++ g++296
ln -s gcc gcc296
2、makefile范本
PROG=testocci.exe
OBJ = test.o
INC = -I$(ORACLE_HOME)/rdbms/public/ #-I/usr/include/g++-3/
#LIBDIR =-L/usr/lib/oracle/10.2.0.3/client/lib
LIBDIR = -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib
$(PROG):$(OBJ)
g++ $(LIBDIR) -locci -lclntsh -o $(PROG) $(OBJ)
test.o:test.cpp
g++ $(INC) -g -c test.cpp
clean:
rm -rf $(PROG) $(OBJ)
查看标准库的头文件
rpm -qf /usr/include/g++-3/std/straits.h