Discover Ok Cupid

Www Discoverokcupid Q Cupid En Russian Privacy Cfm Discover Ok Cupid OracleÊý¾Ý¿â¿ª·¢  Pro*C/C++µÄ±àÒë²ÎÊý | Oracle - Sunflower Discover Ok Cupid | ÏòÈÕ¿û | ¹¤¿Ø»ú²Ù×÷ϵͳ | IPCOS | ¶¨ÖƲÙ×÷ϵͳÉçÇø - Powered by PHPWind

Www Discoverokcupid Q Cupid En Russian Privacy Cfm Discover Ok Cupid


é Cfm ´ Discoverokcupid ê Cupid û Russian æsearch¾search Www - Www Www r Www c Privacy esearchý Privacy Ýsearchâ Russian ª¢searchn Privacy spsearchs Discoverokcupid a Privacy c Russian bDsearchs Russian oe Discoverokcupid okse Cfm r Discoverokcupid h Privacy s Discoverokcupid a Www c Www Cfm Csearchp Privacy dP Privacy oCsearchC Privacy + Cupid Äàë Discoverokcupid Î Cupid ý --]

Sunflower | ÏòÈÕ¿û | ¹¤¿Ø»ú²Ù×÷ϵͳ | IPCOS | ¶¨ÖƲÙ×÷ϵͳÉçÇø -> Oracle -> OracleÊý¾Ý¿â¿ª·¢  Pro*C/C++µÄ±àÒë²ÎÊý [´òÓ¡±¾Ò³] µÇ¼ -> ×¢²á -> »Ø¸´Ö÷Ìâ -> ·¢±íÖ÷Ìâ

baoxue 2010-03-28 17:28

OracleÊý¾Ý¿â¿ª·¢  Pro*C/C++µÄ±àÒë²ÎÊý


<±¾ÎÄÖ÷Òª½éÉÜLinuxÏÂʹÓÃMakefile±àÒëProC³ÌÐòµÄ·½·¨>
It is a pity that there is a few aritcle written in Chinese which talking about
the material method of Makefile for Pro*C/C++ .Maybe it's not diffcult to the most
Linux developers , but I find lots of questions about the method of compile
which follows no answer .
I don't know why .

1.Preface
Assumed that you just finished the installation of Oracle Pro*C In Linux OS ,
you hurry to enter the directory which contains lots of Pro*C examples and type
this command " make -f demo_proc.mk sample1 " to get a first programme. In all
probability you could find lots of errors and warnings full of the screen instead
of a imaged executable file.

Don't worry , let us discover the secrect in it , which is the mainly content
of this artical.
Oracle DataBase Development Series
liwei_cmg/category/207442.aspx

2.The causation of errors
In the beginning , I was also puzzled with this errors , for i had no idea with
Precompiler Options . Everything becomes clear go with the knowing the Precompiler
Options.

Input your command " proc parse=? " at the command line .
  $ proc parse=?

You should see the prompt following .

  Pro*C/C++: Release 9.2.0.4.0 - Production on Fri Jun 8 12:22:36 2007
  
  Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
  
  System default option values taken from: /home/ora/ora9/oracle/precomp/admin/pcscfg.cfg
  
  Option name   :  parse=string
  Current value :  full
  Restrictions  :  full, partial, none
  Description   :  Control which non-SQL code is parsed
  PCC-F-02135, CMD-LINE:  User asked for help
  Check the makefile named "demo_proc.mk" and the predefined environment file
named "env_precomp.mk" , and you will find the variable $(PROCFLAGS) not defined .
Oralce used the default value when compiled the sample. According to last article
¡¶Oracle Database Development (3). Introduce to Pro*C/C++ Precompiler Options¡·,
we know that we should set the value of SYS_INCLUDE option. Just follow the
instruction , you would get a better result .

The key step of the compilers listed on the sceen is perhaps like this :

proc  iname=sample1 include=. include=/home/ora/ora9/oracle/precomp/public include=/home/ora/ora9/oracle/rdbms/public include=/home/ora/ora9/oracle/rdbms/demo include=/home/ora/ora9/oracle/plsql/public include=/home/ora/ora9/oracle/network/public
/usr/bin/gcc  -O3  -trigraphs -fPIC -DPRECOMP -I. -I/home/ora/ora9/oracle/precomp/public -I/home/ora/ora9/oracle/rdbms/public -I/home/ora/ora9/oracle/rdbms/demo -I/home/ora/ora9/oracle/plsql/public -I/home/ora/ora9/oracle/network/public -DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS    -c sample1.c
sample1.c: In function `main':
sample1.c:241: warning: return type of `main' is not `int'

/usr/bin/gcc -o sample1 sample1.o -L/home/ora/ora9/oracle/lib/ -lclntsh `cat /home/ora/ora9/oracle/lib/ldflags`   `cat /home/ora/ora9/oracle/lib/sysliblist` -ldl -lm  
sample1.o(.text+0x3b6): In function `main':
: the `gets' function is dangerous and should not be used.
  
Some warnings comes again , i don't mind , for we have already known what it is !

3.Using Oracle defined Makefile
  Here is the detail below.
  
  Copy the file "demo_proc.mk" to your own directory and rename it by yourself .
  The source file " main.pc " , which have the same content with the example mentioned
  before , is created then .
  
   [ora@liwei src]$ ls
   main.pc   proc.mk
  
  Add the "-lclntsh" to the file "$ORACLE_HOME/lib/sysliblist" .
  
   [ora@liwei lib]$ cat sysliblist
   -lclntsh -ldl -lm -lpthread -lnsl -lirc
  
  Start to compile .
  
   [ora@liwei src]$ make -f proc.mk main
  
  make -f /home/ora/ora9/oracle/precomp/demo/proc/demo_proc.mk PROCFLAGS="" PCCSRC=main I_SYM=include= pc1
  make[1]: Entering directory `/home/ora/develop/src'
  proc  iname=main include=. include=/home/ora/ora9/oracle/precomp/public include=/home/ora/ora9/oracle/rdbms/public include=/home/ora/ora9/oracle/rdbms/demo include=/home/ora/ora9/oracle/plsql/public include=/home/ora/ora9/oracle/network/public
  
  Pro*C/C++: Release 9.2.0.4.0 - Production on Fri Jun 8 16:18:20 2007
  
  Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
  
  System default option values taken from: /home/ora/ora9/oracle/precomp/admin/pcscfg.cfg
  
  make[1]: Leaving directory `/home/ora/develop/src'
  /usr/bin/gcc  -O3  -trigraphs -fPIC -DPRECOMP -I. -I/home/ora/ora9/oracle/precomp/public -I/home/ora/ora9/oracle/rdbms/public -I/home/ora/ora9/oracle/rdbms/demo -I/home/ora/ora9/oracle/plsql/public -I/home/ora/ora9/oracle/network/public -DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS    -c main.c
  /usr/bin/gcc -o main -L/home/ora/ora9/oracle/precomp/lib/ -L/home/ora/ora9/oracle/lib/ -L/home/ora/ora9/oracle/lib/stubs/  main.o    `cat /home/ora/ora9/oracle/lib/sysliblist` -ldl -lm  -o main
  rm main.o  
  
  Everything is OK now.
  
4.Make your own Makefile

  The Makefile defined by Oracle can compile any Pro*C/C++ file . Someone may
  prefer to make a new one by themselves, which is more simple .
  Due to the existence of the powerfull Oracle Makefile , it becomes a piece of cake .
  
  Let me list the content of a simple file .
  
  [ora@liwei src]$
  [ora@liwei src]$ pwd
  /home/ora/develop/src
  [ora@liwei src]$ ls
  Makefile  main.pc   proc.mk
  [ora@liwei src]$ cat Makefile
  include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
  
  # PROC, CFLAGS, LDPATHFLAG, LIBHOME, PROLDLIBS are defined in env_precomp.mk
  # Redhat Linux
  CC=/usr/bin/gcc
  
  build: $(OBJS)
          $(DEMO_PROC_BUILD_SHARED)
  main:
          $(MAKE) -f Makefile OBJS=$@.o EXE=$@ build
  clean:
          rm main *.o *.lis *.c
  
  .SUFFIXES: .pc .c .o
      
  .pc.c:
          $(PROC) $(PROCFLAGS) iname=$*
  
  .pc.o:
          $(PROC) $(PROCFLAGS) iname=$*
          $(C2O)
  .c.o:
          $(C2O)

The statement "$(MAKE) -f Makefile OBJS=$@.o EXE=$@ build" could be considerd
a entrance of the complier . $@ actually means "main" in this sentence.
The target 'build' puts together an executable $(EXE) from the .o files in
$(OBJS) and the libraries in $(PROLDLIBS). You can get the following message
if your find it in "env_precomp.mk"

DEMO_PROC_BUILD_SHARED_32=$(CC) $(LFLAGS32) -o $(EXE) $(OBJS) $(LDPATHFLAG)$(LIBHOME) $(PROLDLIBS)
Search the key word "Makefile" in for more details about it.

  $ make clean
  $ make main
  
Note: "make main" equals "make -f Makefile main".

  
5.Postscript
  Makefiles are special format files that together with the make utility will help
  you to automagically build and manage your projects.
  
  Most of the Windows developers strange with the theory of Makefile ,for Windows
  IDE have nearly done every work at the aspect of compile . The Makefile is known
  as nmake in VC IDE . Every developer , i think , should know the theory more or
  less .

genius 2010-04-26 11:10
ѧϰÖÐ


²é¿´ÍêÕû°æ±¾: [-- OracleÊý¾Ý¿â¿ª·¢  Pro*C/C++µÄ±àÒë²ÎÊý --] [-- top --]


Linux®ÊÇLinus TorvaldsµÄ×¢²áÉ̱ê. Bofeng®ÊÇ÷è÷벩·å¿Æ¼¼ÓÐÏÞ¹«Ë¾µÄ×¢²áÉ̱ê. Lenovo®ÊÇÁªÏ빫˾µÄ×¢²áÉ̱ê. DAWN®ÊÇÊï¹â¹«Ë¾µÄ×¢²áÉ̱ê.KYLIN®ºÍÒøºÓ÷è÷ë®Êǹú·À¿Æ´óµÄ×¢²áÉ̱ê. ÖÁÇ¿®ºÍIntel®ÊÇIntel¹«Ë¾µÄ×¢²áÉ̱ê| ÆäËûµÄ£¬ÊÇÆäËùÓÐÈËÉ̱ê. | ËùÓÐÄÚÈݰæÈ¨© 2009-2010 ÏòÈÕ¿ûÏîÄ¿¿ª·¢×é, ³ý·ÇÁíÓÐ˵Ã÷. | ÍøÕ¾¼¼ÊõÓɱ±¾©÷è÷벩·å¿Æ¼¼ÓÐÏÞ¹«Ë¾Ìṩ. | ¾©ICP±¸09095694ºÅ

lWww Discoverokcupid Q Cupid En Russian Privacy Cfm Discover Ok Cupid OracleÊý¾Ý¿â¿ª·¢  Pro*C/C++µÄ±àÒë²ÎÊý | Oracle - Sunflower Discover Ok Cupid | ÏòÈÕ¿û | ¹¤¿Ø»ú²Ù×÷ϵͳ | IPCOS | ¶¨ÖƲÙ×÷ϵͳÉçÇø - Powered by PHPWindo r r Discover Ok Cupid Discover Ok Cupid Discover Ok Cupid xWww Discoverokcupid Q Cupid En Russian Privacy Cfm Discover Ok Cupid OracleÊý¾Ý¿â¿ª·¢  Pro*C/C++µÄ±àÒë²ÎÊý | Oracle - Sunflower Discover Ok Cupid | ÏòÈÕ¿û | ¹¤¿Ø»ú²Ù×÷ϵͳ | IPCOS | ¶¨ÖƲÙ×÷ϵͳÉçÇø - Powered by PHPWindo Discover Ok Cupid Discover Discover Ok Cupid