No header files found. When creating an Oci driver in Qt

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

This works well until the last step in which I replace nmake with mingw32-make. I get it.

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 many errors, but I think they are all related to the fact that they cannot find the header files. Can someone tell me why this is happening? I have included all the paths to INCLUDE and LIB correctly, as indicated in the first two steps.

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

+1
source share
2 answers

To fix the remaining two header questions, what I did -

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

  • qsqlcachedresult_p.h is located in the QT / src / sql / kernel directory. So I copied the header file to a new directory in C: \ QtSDK \ Desktop \ Qt \ 4.7.4 \ mingw \ include \ QtSql \ private.

Compiled without errors after that.

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

0
source

Try adding include\QtSql to -I . I do not know how to do this in this environment, but it may work

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

before executing the make .

0
source

Source: https://habr.com/ru/post/1490984/


All Articles