database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
ㆍOracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Oracle Q&A 3014 게시물 읽기
No. 3014
문태준님... 좀 갈켜 주세요..pro*c
작성자
전병제
작성일
2001-02-14 18:40
조회수
2,371

x86 솔라리스 , 오라클 8i를 사용하고 잇습니다.

 

pro*c 사용을 해야 하는데요... gcc 를 이용하거든요..

 

그런데... 참 예상과 같이(?) 안되는 군요.

 

/export/home/OraHome1/precomp/demo/demo_proc.mk

파일에서 $(CC) 로 되어 있는 부분을 $(GCC) 로 바꿔 줬구요..

 

 

/export/home/OraHome1/precomp/lib/env_precomp.mk

파일에서 CC=CC 부분을 CC=GCC 그리고 GCC=GCC 부분을 추가해 줬습니다.

 

demo_proc.mk 파일을 aaㅁ.mk 파일로 수정해서 했습니다.

 

어케해야 되는지 아래와 같이 에러가 납니다.

 

 

$ make -f aaa.mk EXE=sqltest2 OBJS=sqltest2.o build

gcc -xO3 -Xa -mr -xstrconst -xchip=pentium_pro -K PIC -DPRECOMP -I. -I/export/home/OraHome1/precomp/public -I/export/home/OraHome1/rdbms/public -I/export/home/OraHome1/rdbms/demo -I/export/home/OraHome1/plsql/public -I/export/home/OraHome1/network/public -DSLMXMX_ENABLE -DSLTS_ENABLE -D_REENTRANT -DUNIFIED_INTEL -DSOL_X86 -DSVR4 -Di386 -c sqltest2.c

gcc: PIC: No such file or directory

gcc: unrecognized option `-Xa'

gcc: unrecognized option `-K'

gcc: language chip=pentium_pro not recognized

*** Error code 1

make: Fatal error: Command failed for target `sqltest2.o'

 

 

난감하네요...

 

aaa.mk 파일입니다.

include $(ORACLE_HOME)/precomp/lib/env_precomp.mk

 

# This Makefile builds the sample programs in

# $(ORACLE_HOME)/precomp/demo/proc, and can serve as a template for linking

# customer applications.

#

# SAMPLES is a list of the c proc sample programs.

# CPPSAMPLES is a list of the c++ proc sample programs.

# OBJECT_SAMPLES is a list of the proc sample programs using the new

# type features. You must install ott in addition to proc to run some

# of those samples.

#

SAMPLES=sample1 sample2 sample3 sample4 sample6 sample7 sample8 \

sample9 sample10 sample11 sample12 oraca sqlvcp cv_demo \

ansidyn1 ansidyn2

CPPSAMPLES=cppdemo1 cppdemo3

OBJECT_SAMPLES=objdemo1 lobdemo1 coldemo1 navdemo1

#

# These targets are build all of a class of samples in one call to make.

#

samples: $(SAMPLES)

cppsamples: $(CPPSAMPLES)

object_samples: $(OBJECT_SAMPLES)

#

# The target 'build' puts together an executable $(EXE) from the .o files

# in $(OBJS) and the libraries in $(PROLDLIBS). It is used to build the

# c sample programs. The rules to make .o files from .c and .pc files are

# later in this file.

# ($(PROLDLIBS) includes the client shared library, and $(STATICPROLDLIBS) does

# not.)

#

build: $(OBJS)

$(GCC) -o $(EXE) $(OBJS) -L$(LIBHOME) $(PROLDLIBS)

build_static: $(OBJS)

$(GCC) -o $(EXE) $(OBJS) -L$(LIBHOME) $(STATICPROLDLIBS)

$(SAMPLES) $(OBJECT_SAMPLES):

$(MAKE) -f $(MAKEFILE) OBJS=$@.o EXE=$@ build

#

# The c++ samples are built using the 'cppbuild' target. It precompiles to

# get a .c file, compiles to get a .o file and then builds the executable.

#

cppbuild:

$(PROC) $(PROCPPFLAGS) iname=$(EXE)

$(CPLUSPLUS) -c $(INCLUDE) $(EXE).c

$(CPLUSPLUS) -o $(EXE) $(OBJS) -L$(LIBHOME) $(CPPLDLIBS)

cppbuild_static:

$(PROC) $(PROCPPFLAGS) iname=$(EXE)

$(CPLUSPLUS) -c $(INCLUDE) $(EXE).c

$(CPLUSPLUS) -o $(EXE) $(OBJS) -L$(LIBHOME) $(STATICCPPLDLIBS)

$(CPPSAMPLES): cppdemo2

$(MAKE) -f $(MAKEFILE) OBJS=$@.o EXE=$@ cppbuild

#

# sample5.pc illustrates the precompiler part of building a precompiler-forms

# application. Building the actual executable would require the FORMS bundle.

#

sample5:

@echo 'sample5 is a user-exit demo; use a forms makefile to build it.'

 

cppdemo2: empclass.o

$(MAKE) -f $(MAKEFILE) OBJS="cppdemo2.o empclass.o" EXE=$@ cppbuild

cppdemo2_static: empclass.o

$(MAKE) -f $(MAKEFILE) OBJS="cppdemo2.o empclass.o" EXE=cppdemo2 cppbuild_static

 

#

# Some of the samples require that .sql scripts be run before precompilation.

# If you set RUNSQL=run in your call to make, then make will use sqlplus or

# svrmgrl, as appropriate, to run the .sql scripts.

# If you leave RUNSQL unset, then make will print out a reminder to run the

# scripts.

# If you have already run the scripts, then RUNSQL=done will omit the reminder.

#

sqlplus_run:

($(CD) ../sql; $(BINHOME)sqlplus $(USER) @$(SCRIPT) < /dev/null)

svrmgrl_run:

($(CD) ../sql; $(BINHOME)svrmgrl < $(SCRIPT).sql)

sqlplus_ svrmgrl_:

@$(ECHO) "# You must run the .sql script, " $(SCRIPT),

@$(ECHO) "# before precomping this sample."

sqlplus_done svrmgrl_done:

#

calldemo-sql:

$(MAKE) -f $(MAKEFILE) USER=scott/tiger SCRIPT=calldemo sqlplus_$(RUNSQL)

sample11-sql:

$(MAKE) -f $(MAKEFILE) USER=scott/tiger SCRIPT=sample11 sqlplus_$(RUNSQL)

cv_demo-sql:

$(MAKE) -f $(MAKEFILE) USER=scott/tiger SCRIPT=cv_demo sqlplus_$(RUNSQL)

cppdemo2-sql:

$(MAKE) -f $(MAKEFILE) USER=scott/tiger SCRIPT=cppdemo2 sqlplus_$(RUNSQL)

lobdemo1-sql:

$(MAKE) -f $(MAKEFILE) SCRIPT=lobdemo1c svrmgrl_$(RUNSQL)

objdemo1-sql:

$(MAKE) -f $(MAKEFILE) SCRIPT=objdemo1 svrmgrl_$(RUNSQL)

coldemo1-sql:

$(MAKE) -f $(MAKEFILE) SCRIPT=coldemo1 svrmgrl_$(RUNSQL)

navdemo1-sql:

$(MAKE) -f $(MAKEFILE) SCRIPT=navdemo1 svrmgrl_$(RUNSQL)

#

# Here are some rules for converting .pc -> .c -> .o and for .typ -> .h.

#

# If proc needs to find .h files, it should find the same .h files that the

# c compiler finds. We use a macro named INCLUDE to hadle that. The general

# format of the INCLUDE macro is

# INCLUDE= $(I_SYM)dir1 $(I_SYM)dir2 ...

#

# Normally, I_SYM=-I, for the c compiler. However, we have a special target,

# pc1, which calls $(PROC) with various arguments, include $(INCLUDE). It

# is used like this:

# $(MAKE) -f $(MAKEFILE) <more args to make> I_SYM=include= pc1

# This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLE).

.SUFFIXES: .pc .c .o .typ .h

 

pc1:

$(PROC) $(PROCFLAGS) iname=$(PCCSRC) $(INCLUDE)

 

.pc.c:

$(PROC) $(PROCFLAGS) iname=$*

 

.pc.o:

$(PROC) $(PROCFLAGS) iname=$*

$(GCC) $(CFLAGS) -c $*.c

 

.c.o:

$(GCC) $(CFLAGS) -c $*.c

 

.typ.h:

$(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c user=scott/tiger

#

# These are specific targets to make the .o files for samples that require

# more careful handling.

sample9.o: sample9.pc calldemo-sql

$(PROC) $(PROCPLSFLAGS) iname=$*

$(GCC) $(CFLAGS) -c $*.c

 

cv_demo.o: cv_demo.pc cv_demo-sql

$(PROC) $(PROCPLSFLAGS) iname=$*

$(GCC) $(CFLAGS) -c $*.c

 

sample11.o: sample11.pc sample11-sql

$(PROC) $(PROCPLSFLAGS) iname=$*

$(GCC) $(CFLAGS) -c $*.c

 

sample4.o: sample4.pc

$(MAKE) -f $(MAKEFILE) PCCSRC=$* I_SYM=include= pc1

$(GCC) $(CFLAGS) -c $*.c

 

ansidyn1.o: ansidyn1.pc

$(PROC) mode=ansi iname=$*

$(GCC) $(CFLAGS) -c $*.c

 

ansidyn2.o: ansidyn2.pc

$(PROC) dynamic=ansi iname=$*

$(GCC) $(CFLAGS) -c $*.c

 

empclass.o: empclass.pc cppdemo2-sql

$(MAKE) -f $(MAKEFILE) PROCFLAGS="sqlcheck=full user=scott/tiger $(PROCPPFLAGS)" PCCSRC=$* I_SYM=include= pc1

$(CPLUSPLUS) -c $(INCLUDE) $*.c

 

lobdemo1.o: lobdemo1.pc lobdemo1-sql

$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCPLSFLAGS)" PCCSRC=$* I_SYM=include= pc1

$(GCC) $(CFLAGS) -c $*.c

 

objdemo1.o: objdemo1.pc objdemo1.typ objdemo1-sql

$(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c user=scott/tiger

$(MAKE) -f $(MAKEFILE) PROCFLAGS=intype=$*o.typ PCCSRC=$* I_SYM=include= pc1

$(GCC) $(CFLAGS) -c $*.c

 

coldemo1.o: coldemo1.pc coldemo1.typ coldemo1-sql

$(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c user=scott/tiger

$(MAKE) -f $(MAKEFILE) PROCFLAGS=intype=$*o.typ PCCSRC=$* I_SYM=include= pc1

$(GCC) $(CFLAGS) -c $*.c

 

navdemo1.o: navdemo1.pc navdemo1.typ navdemo1-sql

$(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c user=scott/tiger

$(MAKE) -f $(MAKEFILE) PROCFLAGS=intype=$*o.typ PCCSRC=$* I_SYM=include= pc1

$(GCC) $(CFLAGS) -c $*.c

#

# The macro definition fill in some details or override some defaults from

# other files.

#

OTTFLAGS=$(PCCFLAGS)

CLIBS= $(TTLIBS_QA) $(LDLIBS)

PRODUCT_LIBHOME=

MAKEFILE=$(ORACLE_HOME)/precomp/demo/proc/demo_proc.mk

PROCPLSFLAGS= sqlcheck=full userid=$(USERID)

PROCPPFLAGS= code=cpp $(CPLUS_SYS_INCLUDE)

USERID=scott/tiger

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)public

$(I_SYM)$(NETWORKHOME)public

[Top]
No.
제목
작성자
작성일
조회
3023고맙슴다.
정은영
2001-02-15
1648
3020user 생성후에 권한 설정은 어떻게??
정은영
2001-02-15
1830
3022┕>Re: user 생성후에 권한 설정은 어떻게??
장정철
2001-02-15 10:31:08
2343
3016쿼리 만드는 것 좀 도와주세요.
데커드
2001-02-14
1847
3018┕>Re: 쿼리 만드는 것 좀 도와주세요.
아마도
2001-02-14 23:23:23
2439
3014문태준님... 좀 갈켜 주세요..pro*c
전병제
2001-02-14
2371
3012오라클에서..1초안에 결과가 나올수 있는 최대 레코드의 수는..?
revizes
2001-02-14
2090
3013┕>Re: 님께서 만약 하신다면 저한테도 결과좀 알려주세요..^^
dontgo
2001-02-14 18:15:36
2274
3011이미지 파일 컬럼을 다루는 방법 좀 알려주세요 ~!!
linus923
2001-02-14
2093
3017┕>Re: 이미지 파일 컬럼을 다루는 방법 좀 알려주세요 ~!!
소몰이
2001-02-14 23:11:27
3137
3009윈도우용 오라클은 어대서?
도우너
2001-02-14
1999
3019┕>Re: 윈도우용 오라클은 어대서?
아마도
2001-02-14 23:26:38
2570
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.018초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다