Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure error with Qt 5.8 and SQL libraries

Tags:

c++

qt

qt5.8

While building Qt 5.7, I used to call the following command line:

C:\SDK\Qt\src\configure -commercial -confirm-license -debug-and-release -force-debug-info -ltcg -static -angle -nomake examples -nomake tests -qt-sql-odbc -qt-sql-sqlite -qt-zlib -D Z_PREFIX -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtpurchasing -skip qttools -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtquickcontrols2 -skip qtsensors -skip qtserialport -skip qtsvg -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -prefix C:\SDK\Qt\x64

However, with Qt 5.8, this command line fails with the following error message:

ERROR: Invalid value given for boolean command line option 'sql-odbc'.

ERROR: Invalid value given for boolean command line option 'sql-sqlite'.

According to the Qt 5.8 documentation, my command line seems just fine.

What am I supposed to do ?

like image 667
Arnaud Avatar asked Feb 27 '17 08:02

Arnaud


1 Answers

Apparently the parameters have been renamed. and the documentation is not up to date.

The correct command line is:

C:\SDK\Qt\src\configure -commercial -confirm-license -debug-and-release -force-debug-info -ltcg -static -angle -nomake examples -nomake tests -sql-odbc -sql-sqlite -qt-zlib -D Z_PREFIX -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtpurchasing -skip qttools -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtquickcontrols2 -skip qtsensors -skip qtserialport -skip qtsvg -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -prefix C:\SDK\Qt\x64

It looks like we should now use -sql<driver> instead of -qt-sql<driver>.

like image 193
Arnaud Avatar answered Oct 06 '22 00:10

Arnaud