Oracle의 경우, RM 섹션은 Oracle Pro*C를 설치하면 같이 깔리는 샘플 proc 파일을 컴파일 시켜서 거기에 붙는 library link 목록을 써주면 됩니다.
일단.. 8i를 컴파일 시켜볼까요?
make -f /oracle8/app/oracle/product/8.1.7/precomp/demo/proc/demo_proc.mk
OBJS=sample1.o EXE=sample1 build
proc iname=sample1
cc -xO2 -Xa -xstrconst -xF -mr -xarch=v8 -xcache=16/32/1:1024/64/1
-xchip=ultra -D_REENTRANT -K PIC -DPRECOMP -I.
-I/oracle8/app/oracle/product/8.1.7/precomp/public
-I/oracle8/app/oracle/product/8.1.7/rdbms/public
-I/oracle8/app/oracle/product/8.1.7/rdbms/demo
-I/oracle8/app/oracle/product/8.1.7/plsql/public
-I/oracle8/app/oracle/product/8.1.7/network/public
-DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -c sample1.c
cc -o sample1 sample1.o -L/oracle8/app/oracle/product/8.1.7/lib/ -lclntsh `cat /oracle8/app/oracle/product/8.1.7/lib/sysliblist` -R/oracle8/app/oracle/product/8.1.7/lib -laio -lm -lthread
자.. 길죠? ^^; 이 긴 내용이 다 필요한게 아니구요...
-L/oracle8/app/oracle/product/8.1.7/lib/ -lclntsh
요 내용만이 필요합니다.
옛날에는.. 즉, Oracle 7의 경우에는 :
-L/oracle8/app/oracle/product/8.1.7/lib/ -lclntsh `cat /oracle8/app/oracle/product/8.1.7/lib/sysliblist` -R/oracle8/app/oracle/product/8.1.7/lib -laio -lm -lthread
이걸 모두 사용했는데, Oracle 8부터는 clntsh 라이브러리만 붙이면 되지요.
9i의 경우... 역시 컴파일을 해 보면 좀 다르게 나옵니다.
/usr/ccs/bin/make -f /oracle9/app/oracle/product/920/precomp/demo/proc/demo_proc.mk
OBJS=sample1.o EXE=sample1 build
/usr/ccs/bin/make -f /oracle9/app/oracle/product/920/precomp/demo/proc/demo_proc.mk
PROCFLAGS="" PCCSRC=sample1 I_SYM=include= pc1
proc iname=sample1 include=. include=/oracle9/app/oracle/product/920/precomp/public include=/oracle9/app/oracle/product/920/rdbms/public include=/oracle9/app/oracle/product/920/rdbms/demo include=/oracle9/app/oracle/product/920/plsql/public include=/oracle9/app/oracle/product/920/network/public
cc -xO3 -Xa -xstrconst -dalign -xF -xildoff -errtags=yes -v -xarch=v9 -xchip=ultra3 -W2,-AKNR_S -Wd,-xsafe=unboundsym -Wc,-Qiselect-funcalign=32 -xcode=abs44 -Wc,-Qgsched-trace_late=1 -Wc,-Qgsched-T5 -xalias_level=weak -D_REENTRANT -DSS_64BIT_SERVER -DBIT64 -DMACHINE64 -K PIC -DPRECOMP -I. -I/oracle9/app/oracle/product/920/precomp/public -I/oracle9/app/oracle/product/920/rdbms/public -I/oracle9/app/oracle/product/920/rdbms/demo -I/oracle9/app/oracle/product/920/plsql/public -I/oracle9/app/oracle/product/920/network/public -DSLMXMX_ENABLE -DSLTS_ENABLE -D_SVID_GETTOD -D_REENTRANT -c sample1.c
cc -xarch=v9 -o sample1 sample1.o -L/oracle9/app/oracle/product/920/lib/ -lclntsh `cat /oracle9/app/oracle/product/920/lib/ldflags` `cat /oracle9/app/oracle/product/920/lib/sysliblist` -R/oracle9/app/oracle/product/920/lib -laio -lposix4 -lm -lthread
재밌죠? 약간 다른 것을 느끼실 수 있습니다..
하지만, RM 섹션은 똑같이 구성하시면 됩니다.
역시나, -L/oracle9/app/oracle/product/920/lib/ -lclntsh 이것만 붙이면 되죠.
즉, RM 파일의 내용은...
# ORACLE 8i
Oracle8_XA:xaosw:-L/oracle8/app/oracle/product/8.1.7/lib -lclntsh
# ORACLE 9i
Oracle9_XA:xaosw:-L/oracle9/app/oracle/product/920/lib -lclntsh
이렇게 되겠군요. ^^;;
이렇게 되면 9i TMS 만드는 법은?
buildtms -r Oracle9_XA -o TMS_ORACLE9
뭐 이딴 식으로 만들면 되겠네요.. ^^
( ^^)/~