编译QT包含由configure检测到但由nmake找不到的路径

时间:2014-09-18 22:43:34

标签: c++ mysql visual-studio-2010 qt5 nmake

我试图在Win8.1和Visual Studio Compiler 2010上使用mysql支持构建QT5静态。

试图遵循上游自述文件,这就是我的构建命令(在VS终端中作为管理员执行):

configure -static -qt-sql-mysql -prefix %CD%\qtbase -opensource -nomake tests -release 
-nomake examples -I "C:\Program Files (x86)\MySQL\MySQL Connector C++ 1.1.3\include" 
-I "C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include"
-l "C:\Program Files (x86)\MySQL\MySQL Connector C++ 1.1.3\lib\opt"
-l "C:\Qt\Qt5.3.2\5.3\Src\qtbase\src\plugins\sqldrivers"
-l "C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\lib\" -mp

结果就是这样,配置似乎正确找到了路径:

Sql Drivers:
    ODBC....................no
    MySQL...................yes
    OCI.....................no
    PostgreSQL..............no
    TDS.....................no
    DB2.....................no
    SQLite..................yes (qt)
    SQLite2.................no
    InterBase...............no

Sources are in..............C:\Qt\Qt5.3.2\5.3\Src\qtbase
Build is done in............C:\Qt\Qt5.3.2\5.3\Src\qtbase
Install prefix..............C:\Qt\Qt5.3.2\5.3\Src\qtbase
Headers installed to........C:\Qt\Qt5.3.2\5.3\Src\qtbase\include
Libraries installed to......C:\Qt\Qt5.3.2\5.3\Src\qtbase\lib
Arch-dep. data to...........C:\Qt\Qt5.3.2\5.3\Src\qtbase
Plugins installed to........C:\Qt\Qt5.3.2\5.3\Src\qtbase\plugins
Library execs installed to..C:\Qt\Qt5.3.2\5.3\Src\qtbase\bin
QML1 imports installed to...C:\Qt\Qt5.3.2\5.3\Src\qtbase\imports
QML2 imports installed to...C:\Qt\Qt5.3.2\5.3\Src\qtbase\qml
Binaries installed to.......C:\Qt\Qt5.3.2\5.3\Src\qtbase\bin
Arch-indep. data to.........C:\Qt\Qt5.3.2\5.3\Src\qtbase
Docs installed to...........C:\Qt\Qt5.3.2\5.3\Src\qtbase\doc
Translations installed to...C:\Qt\Qt5.3.2\5.3\Src\qtbase\translations
Examples installed to.......C:\Qt\Qt5.3.2\5.3\Src\qtbase\examples
Tests installed to..........C:\Qt\Qt5.3.2\5.3\Src\qtbase\tests
Include paths...............C:\Program Files (x86)\MySQL\MySQL Connector C++ 1.1
.3\include C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include
Additional libraries........-lC:\Program Files (x86)\MySQL\MySQL Connector C++ 1
.1.3\lib\opt -lC:\Qt\Qt5.3.2\5.3\Src\qtbase\src\plugins\sqldrivers -lC:\Program
Files (x86)\MySQL\MySQL Connector C 6.1\lib"
WARNING: Using static linking will disable the use of plugins.
     Make sure you compile ALL needed modules into the library.

Generating Makefiles...
C:/Qt/Qt5.3.2/5.3/Src/qtbase/mkspecs/qmodule.pri:13: Missing closing " quote


Qt is now configured for building. Just run nmake.
To reconfigure, run nmake confclean and configure.

现在问题是,我只运行

nmake

结果

          cl -c -FIqt_pch.h -Yuqt_pch.h -Fp.pch\release\Qt5Sql_pch.pch -nologo -Zm
   200 -Zc:wchar_t -arch:SSE2 -O2 -MD -GR -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQ
   T_NO_USING_NAMESPACE -DQT_BUILD_SQL_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNIN
   GS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_C
   OMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_B
   EFORE=0x040800 -DQT_NO_CAST_FROM_ASCII -DNDEBUG -DSQLITE_OMIT_LOAD_EXTENSION -DS
   QLITE_OMIT_COMPLETE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLI
   TE_ENABLE_RTREE -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CORE_LIB -I"..\..\include"
    -I"..\..\include\QtSql" -I"..\..\include\QtSql\5.3.2" -I"..\..\include\QtSql\5.
   3.2\QtSql" -I"tmp" -I"..\3rdparty\sqlite" -I"..\..\include\QtCore\5.3.2" -I"..\.
   .\include\QtCore\5.3.2\QtCore" -I"..\..\include\QtCore" -I".moc\release" -I"..\.
   .\mkspecs\win32-msvc2010" -Fo.obj\release\ @C:\Users\kili\AppData\Local\Temp\nm4
   574.tmp
   qsqldatabase.cpp
   c:\qt\qt5.3.2\5.3\src\qtbase\src\sql\kernel\../drivers/mysql/qsql_mysql_p.h(63)
   : fatal error C1083: Datei (Include) kann nicht geöffnet werden: "mysql.h": No s
   uch file or directory
   NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0
   \VC\BIN\cl.EXE"": Rückgabe-Code "0x2"
   Stop.
   NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 10.0
   \VC\BIN\nmake.exe"": Rückgabe-Code "0x2"
   Stop.
   NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
   Stop.
   NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
   Stop.
   NMAKE : fatal error U1077: "cd": Rückgabe-Code "0x2"
   Stop.

找不到mysql.h,但是在configure中找到了正确的包含:

    C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include>dir
    Volume in Laufwerk C: hat keine Bezeichnung.
    Volumeseriennummer: 5E70-A76B

    Verzeichnis von C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include

   20.06.2014  17:35    <DIR>          .
   20.06.2014  17:35    <DIR>          ..
   11.06.2014  05:10             3.654 big_endian.h
   11.06.2014  05:10             2.555 byte_order_generic.h
   11.06.2014  05:10             1.504 byte_order_generic_x86.h
   11.06.2014  05:10             5.193 decimal.h
   11.06.2014  05:10             4.297 errmsg.h
   11.06.2014  05:10             7.078 keycache.h
   11.06.2014  05:10             3.134 little_endian.h
   20.06.2014  17:35    <DIR>          mysql
   11.06.2014  05:10            29.219 mysql.h
   11.06.2014  06:19            98.278 mysqld_ername.h
   11.06.2014  06:19            36.517 mysqld_error.h
   11.06.2014  05:10            24.846 mysql_com.h
   11.06.2014  05:10             1.313 mysql_com_server.h
   11.06.2014  05:10             1.142 mysql_embed.h
   11.06.2014  05:10             2.172 mysql_time.h
   11.06.2014  06:19               989 mysql_version.h
   11.06.2014  05:10             2.009 my_alloc.h
   11.06.2014  05:10             5.488 my_byteorder.h
   11.06.2014  05:10             3.678 my_compiler.h
   11.06.2014  06:18            12.311 my_config.h
   11.06.2014  05:10             8.281 my_dbug.h
   11.06.2014  05:10             2.940 my_dir.h
   11.06.2014  05:10             6.163 my_getopt.h
   11.06.2014  05:10            25.504 my_global.h
   11.06.2014  05:10             1.506 my_list.h
   11.06.2014  05:10             1.978 my_net.h
   11.06.2014  05:10            19.960 my_pthread.h
   11.06.2014  05:10            40.760 my_sys.h
   11.06.2014  05:10             2.821 my_xml.h
   11.06.2014  05:10            34.935 m_ctype.h
   11.06.2014  05:10            11.037 m_string.h
   11.06.2014  05:10             7.098 sql_common.h
   11.06.2014  06:19            13.677 sql_state.h
   11.06.2014  05:10             1.678 sslopt-case.h
   11.06.2014  05:10             2.511 sslopt-longopts.h
   11.06.2014  05:10             1.968 sslopt-vars.h
   11.06.2014  05:10             2.282 typelib.h
          36 Datei(en),        430.476 Bytes
           3 Verzeichnis(se), 109.641.277.440 Bytes frei

有人可以告诉我我做错了什么吗?

提前致谢!

0 个答案:

没有答案