5

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 ?

4

1 回答 1

13

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

正确的命令行是:

C:\SDK\Qt\src\configure -commercial -confirm-license -debug-and-release -force-debug-info -ltcg -static -angle -nomake 示例 -nomake 测试-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 qtimageformats -skip -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>.

于 2017-02-27T08:22:52.130 回答