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 3040 게시물 읽기
No. 3040
proc*c 테스트 컴파일시에 에러...좀 고쳐 주세요...고수님..
작성자
이청열
작성일
2001-02-16 12:02
조회수
2,866

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.
제목
작성자
작성일
조회
3044[초보질문] 오라클과 jdbc...
캔디
2001-02-16
2070
3043[질문] 오라클 연동할때 꼭 인터넷이 연결되야 하나요?
무명
2001-02-16
1821
3049┕>Re: [질문] 오라클 연동할때 꼭 인터넷이 연결되야 하나요?
dontgo
2001-02-17 01:23:48
1950
3054 ┕>Re: Re: [질문] 오라클 연동할때 꼭 인터넷이 연결되야 하나요?
도우너
2001-02-17 11:13:29
2079
3041Pro*C 프리컴파일이 안되요. (일주일째 잠을 못자요.TT;)
초보
2001-02-16
3107
3040proc*c 테스트 컴파일시에 에러...좀 고쳐 주세요...고수님..
이청열
2001-02-16
2866
3038817에서 인터미디어 설치해보신분...?
김원철
2001-02-16
1888
3037오라클 서버는 8 이고 클라이언트는 8i 인데 문제 없나요?(Pro*C)
왕초보
2001-02-16
1747
3036[질문]솔라리스8[intel]에서 오라클 설치 성공하신분...
최원용
2001-02-15
1818
3050┕>Re: [질문]솔라리스8[intel]에서 오라클 설치 성공하신분...
dontgo
2001-02-17 01:31:27
2030
3051 ┕>Re: Re: [질문]솔라리스8[intel]에서 오라클 설치 성공하신분...
최원용
2001-02-17 03:21:32
2016
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.018초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다