1

I compiled the Oracle Oci driver as per the instructions for windows as given in http://doc.qt.digia.com/4.7-snapshot/sql-driver.html#general-information-about-the-oci-plugin

It goes well until the last step in which i replace nmake by mingw32-make. I get this.

mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/QtSDK/QtSources/4.7.4/src/sql/drivers/oci'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -
DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\
Desktop\Qt\4.7.4\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\includ
e\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.7.
4\mingw\include\ActiveQt" -I"debug" -I"c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\d
efault" -o debug\qsql_oci.o qsql_oci.cpp
In file included from qsql_oci.cpp:42:
qsql_oci.h:47:46: error: QtSql/private/qsqlcachedresult_p.h: No such file or dir
ectory
qsql_oci.cpp:50:23: error: qsqlerror.h: No such file or directory
qsql_oci.cpp:51:23: error: qsqlfield.h: No such file or directory
qsql_oci.cpp:52:23: error: qsqlindex.h: No such file or directory
qsql_oci.cpp:53:23: error: qsqlquery.h: No such file or directory
qsql_oci.cpp:65:17: error: oci.h: No such file or directory

followed by a lot errors, but i guess all of them are related to make not being able to find header files. Could anyone tell me why this is happening? I did include all the paths to INCLUDE and LIB correctly as given in the first two steps

Update:
I modified the .pro file created by qmake -project and added QT+= sql and all the sql related header errors have gone but the first one qsqlcachedresult_p.h and the last one oci.h remain.

Airmine
  • 107
  • 3
  • 10
  • Where is `qsqlerror.h` actually located on your system? I guess not in the paths passed to g++ in `-I` options - and that is a probable cause of the error. – Jarekczek Sep 22 '12 at 16:56
  • i Checked. All my headers are at c:\QtSDK\Desktop\Qt\4.7.4\mingw\include. And that's included in the arguments to g++/ – Airmine Sep 23 '12 at 07:53

2 Answers2

0

Try adding also include\QtSql to -I options. I don't know exactly how to do that in this environment, but maybe running

set CPP_FLAGS="-Ic:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql"

before the make command would do.

Jarekczek
  • 7,456
  • 3
  • 46
  • 66
  • I modified the .pro file but the two other errors still remain. Updated my question. Thank You! – Airmine Sep 24 '12 at 10:58
  • I see. So 2 files are still not resolved. Maybe they expected a different qt version? With `oci.h` it should be quite easy, just add another `-I` directory. But if there is no path `QtSql/private/qsqlcachedresult_p.h`, then it may be impossible to compile now. Anyway someone with better knowledge of QT is needed here. – Jarekczek Sep 25 '12 at 06:32
0

To resolve the remaining two header issues here's what I did-

  1. For the oci.h file, edited the makefile.release and makefile.debug manually to include the path to the header in the INCPATH variable. ( Something like -I"C:\XEClient\oci\include").

  2. The qsqlcachedresult_p.h was located in the QT/src/sql/kernel directory. So I copied the header file into a new directory at C:\QtSDK\Desktop\Qt\4.7.4\mingw\include\QtSql\private.

Compiled with no errors after that.

This post helped a lot- http://www.qtcentre.org/threads/41904-Oracle-Call-Interface-(OCI)-driver-problems.

Airmine
  • 107
  • 3
  • 10