linux C/C++ 串連oracle

來源:互聯網
上載者:User

1. 下載連結庫 http://www.oracle.com/technetwork/topics/linuxsoft-082809.html 

     可直接下載rmp檔案, 直接rmp -ivh ...rmp

2.  updatedb  更新檔案位置列表

3. 尋找libocci.so 檔案所在位置 , eg:usr/lib/oracle/12.1/client/lib

4. 把usr/lib/oracle/12.1/client/lib 路徑加到vim /etc/ld.so.conf 中配置, 並執行ldconfig 進行更新

5. 可進行編譯測試, 編譯需要指定:-I/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/public  #occi.h標頭檔,所在位置
-L /usr/lib/oracle/12.1/client/lib #lib庫所在位置
 -locci  # 載入此檔案
 -lclntsh /usr/lib/libstdc++.so.6

另: 若下載的是zip檔案,需要自己解壓,配置路徑,網上說需要配置ORACLE_HOME 但我沒試過,先不作發言。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.