The Solaris 10 qt-Compiled Oracle 10g driver

Source: Internet
Author: User

The last book, "Oracle 10g installation in Solaris 10," and now start using QT to compile the Oracle 10g driver! This allows the QT program to be linked to the Oracle database!

Environment Variables for Oracle:

Oracle_base=/oracle
Oracle_home= $ORACLE _base/product/10.0.2

The path of the QT compilation file under Solaris 10:

/export/home/qt-4.3.1/qt-x11-commercial-src-4.3.1

Environment variables for QT:

qtdir=/usr/local/trolltech/qt-4.3.1

Show under Environment variables:

Oracle_base=/oracle
Oracle_home= $ORACLE _base/product/10.0.2
Export Oralce_base Oracle_home

qtdir=/usr/local/trolltech/qt-4.3.1
Path= $QTDIR/bin: $ORACLE _home/bin: $PATH
Ld_library_path= $QTDIR/lib:/usr/openwin/sfw/lib: $ORACLE _home/lib: $LD _library_path
Export Qtdir PATH Ld_library_path

Ok! Start QT 10 with the Oracle 10g Drive, Oracle 10g is the server!

Cd/export/home/qt-4.3.1/qt-x11-commercial-src-4.3.1/src/plugins/sqldrivers/oci
Qmake-o Makefile "includepath+= $ORACLE _home/rdbms/public $ORACLE _home/rdbms/demo" "Libs+=-l$oracle_home/lib- Lclntsh "Oci.pro
Gmake
Gmake Install

So you can find the driver of the libqsqloci.so database in the $QTDIR/plugins/sqldrivers ~ ~

The following settings are required in the pro file in the program used:

QT + = SQL

Test it ~

Qstringlist drivers = qsqldatabase::d rivers ();
foreach (QString driver, drivers)
Qdebug () << "\ t" << driver;

You will be pleasantly surprised to discover that QOCI8 and QOCI are appearing!

At the end of the ink, compile the following configure:

configure-plugin-sql-oic-i/$ORACLE _home/rdbms/public-i/$ORACLE _home/rdbms/demo-l$oracle_home/lib

http://cool.worm.blog.163.com/blog/static/6433900620098711338225/

The Solaris 10 qt-Compiled Oracle 10g driver

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.