Qt Build 5.9.1 Static with OCI Driver
-
Hi all
I want to build Qt 5.9.1 in static with the support of OCI driver.
I configure it with :
-static -debug-and-release -platform win32-g++ -prefix D:\Qt\5.9.1\5.9.1\Static -opensource -confirm-license -c++std c++14 -nomake examples -skip qtdoc -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip location -no-opengl -no-angle -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -qt-freetype -sql-oci "OCI_INCDIR=D:\app\013798432\product\11.2.0\client_1\oci\include" "OCI_LIBDIR=D:\app\013798432\product\11.2.0\client_1\oci\lib\msvc" "OCI_LIBS=-loci -lociw32 -loraocci11"
But I have the following error :
ERROR: Feature 'sql-oci' was enabled, but the pre-condition 'libs.oci' failed.
I also add the INCLUDE path and LIB path in the system environment
How can I do to compil Qt statically with the OCI support ?
-
Hi,
I'd try with replacing your OCI_* variables with
-I "D:\app\013798432\product\11.2.0\client_1\oci\include"
and-L "D:\app\013798432\product\11.2.0\client_1\oci\lib\msvc"
the space is on purpose.Hope it helps
-
configure.bat -v -static -debug-and-release -platform win32-g++ -prefix D:\Qt\5.9.1\5.9.1\Static -opensource -confirm-license -c++std c++14 -nomake examples -skip qtdoc -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip location -no-opengl -no-angle -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -qt-freetype -sql-oci -I "D:\app\013798432\product\11.2.0\client_1\oci\include" -L "D:\app\013798432\product\11.2.0\client_1\oci\lib\msvc"
unfortunately same result
-
Since you have the -v option, did you catch the error message related to OCI ?
-
I made several modifications ... but i think the properly modifications are
In : QtSrc\qtbase\mkspecs\win32-g++\qmake.conf add
QMAKE_LFLAGS += -static -static-libgcc QMAKE_CFLAGS_RELEASE -= -O2 QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer DEFINES += QT_STATIC_BUILD
In : QtSrc\qtbase\src\plugins\sqldrivers\oci\oci.pro add
QMAKE_LFLAGS += oracle_home\oci\lib\msvc\oci.lib QMAKE_LFLAGS += oracle_home\oci\lib\msvc\ociw32.lib QMAKE_LFLAGS += oracle_home\oci\lib\msvc\oraocci11.lib LIBS += -Loracle_home\oci\lib\msvc -loci -lociw32 -loraocci11 INCLUDEPATH += oracle_home\oci\include
cmd
-static -debug-and-release -platform win32-g++ -prefix QtPath\Static -I C:\\OpenSSL-Win32\\include -L C:\\OpenSSL-Win32\\lib -opensource -confirm-license -c++std c++14 -nomake examples -skip qtdoc -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip location -no-opengl -no-angle -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -qt-freetype -sql-oci -I oracle_home\oci\include -L oracle_home\oci\lib\msvc
try it. the other modifications do not matter