使用Qt 5.8和SQL库配置错误

Arn*_*aud 4 c++ qt qt5.8

在构建Qt 5.7时,我曾经调用以下命令行:

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

但是,使用Qt 5.8,此命令行失败,并显示以下错误消息:

错误:为布尔命令行选项'sql-odbc'指定的值无效.

错误:为布尔命令行选项'sql-sqlite'指定的值无效.

根据Qt 5.8文档,我的命令行似乎没问题.

我应该做些什么 ?

Arn*_*aud 10

显然,参数已重命名.并且文档不是最新的.

正确的命令行是:

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

看起来我们现在应该使用-sql<driver>而不是-qt-sql<driver>.