许可优化
许可优化
产品
产品
解决方案
解决方案
服务支持
服务支持
关于
关于
软件库
当前位置:服务支持 >  软件文章 >  Oracle OCI编程与Borland C++ Builder

Oracle OCI编程与Borland C++ Builder

阅读数 4
点赞 0
article_banner

As you may know, Oracle dropped support for Borland Compilers in OCI

  some time back. Well, it isn't all that hard to set up again.

I'm running 9i Release 2 Enterprise Edition on this PC at work and I am

  using Borland C++ Builder 6 to 'play' with OCI programming - I intend to

  build a set of components eventually, but I need to know what I'm doing

  first !

I remember trying in the past to get OCI to work - but had no luck,

  however, this time I decided not to give in so easily. I was depressed

  to find that the old Borland folder under <oracle_hjome>/oci/lib has

  gone - looks like only MS Visual C is supported - and we all know that

  MS and Borland have a different OMF format and there is much wailing and

  gnashing of teeth to get Borland talking to DLLs etc created with MSVC

  and vice versa.

There are docs on Metalink which go into great detail about these

  differences and how it can   screw up your life to use a Borland compiler

  - but I suspect these are now out of date.

Here is what you have to do instead (the following uses my paths -

  adjust for your setup) :

Open a DOS window

cd e:/oracle/ora92/oci/lib
mkdir borland
cd borland

Assuming that the CBuilder bin directory is on your path .....

implib -a oci.lib <oracle_home>/bin/oci.dll

  exit



  That has created an import library to be added to any OCI projects you

  want to create. The '-a' bit is required as it prepends an underscore to

  the exported module names in the dll. This is what used to cause so many

  problems with MS/Borland libraries and stuff in the past.



  The rest is simple, run up C++ Builder and open one of the Oracle

  samples - I used CDemo6 - you'll be asked to create a project to run it,

  do so then save it as BOR_CDemo6.

Project | options and on the directories tab, add
<oracle_home>/oci/include to the includes path.

Then Project | add to project and add <oracle_home>/oci/borland/oci.lib
to the project.

Compile & run - et viola (as French musicians would say) an OCI program

  compiled and running with Borland tools.



  Now you've got that working you have no excuse for not downloading the

  OTL (Oracle Template Library) and using it instead - it is up to release

  4.0.36 now and supports Oracle 9i.

I really hope this helps someone - I could have done with this help

  years ago myself. I'm off to try my hand at 'proper' OCI programming for

  a bit now. <insert big smug grin here>

Cheers,

  Norman.

-------------------------------------

  Norman Dunbar

  Database/Unix administrator

  Lynx Financial Systems Ltd.
mailto:Norman.Dunbar@LFS.co.uk

  Tel: 0113 289 6265

  Fax: 0113 289 3146

  URL: http://www.Lynx-FS.com

  -------------------------------------


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删

相关文章
QR Code
微信扫一扫,欢迎咨询~
customer

online

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 board-phone 155-2731-8020
close1
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

姓名不为空

姓名不为空
手机不正确

手机不正确

手机不正确
公司不为空

公司不为空

公司不为空