pro*c环境配置搜集

Pro*C
Jump to: navigation, search

Pro*C is a C/ C++ precompiler that lets you embed SQL calls directly into C-code. It is a lot more efficient coding-wise than using OCI.

    Pro*C - comes bundled with the Oracle client.
    Used for doing embedded SQL programming using C programs.
    Installation includes a proc or proc.exe executable under $ORACLE_HOME/bin
    Demo programs are under $ORACLE_HOME/precomp/demo/proc 

Getting started on Unix

Start with this simple exercise (if you are running Unix):

    cd $ORACLE_HOME/demo/ directory, usually you find some Pro*C programs under $ORACLE_HOME/precomp/demo/proc/ or $ORACLE_HOME/plsql/demo/ directories, the suffix of the Pro*C programs are *.pc. 

    Make sure that the following environment variables are set:
        LD_LIBRARY_PATH
        ORACLE_HOME
        PATH 

    If you are running the following UNIX types the following environment variables need to be set:
        HP/UX - Set SHLIB_PATH to same value as LD_LIBRARY_PATH.
        AIX - Set LIBPATH to same value as LD_LIBRARY_PATH.
        AIX 4.3+ - Set LINK_CNTRL as L_PTHREADS_D7. 

    Make sure that correct "C" Compiler version is present on your system:
        You may use "which" and "what" command, say which cc. Or use cc -v 

    Relink the sample Pro*C programs:
        There is a sample make file called demo_plsql.mk, which relinks and compiles some of the sample Pro*C programs
        You can edit the file demo_plsql.mk to make necessary modifications to the database username/password (scott/tiger found in demo_plsql.mk) .etc.
        make -f demo_plsql.mk demos
        To Relink and make a single file use, make -f demo_plsql.mk sample1 or make -f demo_proc.mk build EXE=sample1 OBJS=sample1.o or make -f demo_proc.mk build EXE=sample1 OBJS=sample1.o PROCFLAGS="sqlcheck=semantics userid=username/password 

    Running "make" yields the executable files. A makefile is a description file used by the UNIX 'make' utility. The makefile includes dependencies and rules for building a target executable. Such rules can be precompiling commands, compiling commands, linking commands, or commands for removing temporary files. The ultimate goal of the make utility is to build the final executable program using the rules contained within the makefile. The makefile can have any name. 

    Now run the executable file ./sample1 

Also see

    Sample Pro*C scripts (this site) 


在这个网站上还有一些demo,可以参考

http://www.orafaq.com/wiki/Pro*C

下面是pro*c(10g+redhat)的环境配置,也可以参考一下。

http://openszone.com/solutions/proc-environment-configuration-with-redhat-oracle10g.html


http://blog.chinaunix.net/uid-261392-id-2138943.html


http://www.cnblogs.com/leanman/archive/2012/02/10/2345959.html

http://www.cnblogs.com/leanman/archive/2012/02/10/2345953.html


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

-无-为-

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值