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