[SOLVED]NMAKE with MYSQL failed under Qt5.0.0 and win64



  • I have a problem to NMAKE QT5.0.0. The reason is that I always get the following error message although I refused to build with mysql with removin my -qt-sql-mysql tag from configure. I am not able to build. Someone knows about this? Thanks, Harald.

        cl -c -FIqt_pch.h -Yuqt_pch.h -Fp.obj\debug_shared\Qt5Sqld_pch.pch -nolo
    

    go -Zm200 -Zc:wchar_t -Zi -MDd -W3 -w34100 -w34189 -MP -GR -DUNICODE -DWIN32 -DQ
    T_NO_USING_NAMESPACE -DQT_BUILD_SQL_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -
    DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_
    WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_NO_CAS
    T_FROM_ASCII -DQT_CORE_LIB -DQT_NO_EXCEPTIONS -I"....\include" -I"....\include
    \QtSql" -I"....\include\QtSql\5.0.0" -I"....\include\QtSql\5.0.0\QtSql" -I"tmp
    " -I"....\include\QtCore" -I"....\include\QtCore\5.0.0" -I"....\include\QtCor
    e\5.0.0\QtCore" -I".moc\debug_shared" -I"....\mkspecs\win32-msvc2010" -Fo.obj\d
    ebug_shared\ @C:\Users\hsattm72\AppData\Local\Temp\nm23C8.tmp
    qsql_mysql.cpp
    f:\qt\qt-everywhere-opensource-src-5.0.0\qtbase\src\sql\drivers\mysql\qsql_mysql
    .h(52) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or
    directory
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\x86_amd64\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.

    F:\Qt\qt-everywhere-opensource-src-5.0.0>



  • the parameter "-qt-sql-mysql" doesn't exclude mysql from build steps; vice versa it includes mysql to your build.



  • I have removed the -qt-sql-mysql from the parameter list. Still it gives me the same error. Thats what is not clear to me. But in fact I would like to know how to build with mysql. Would be very important.



  • in order to disable mysql you may use "-no-sql-mysql".
    mysql driver in Qt is a plugin, so after reading instructions on http://qt-project.org/doc/qt-4.8/sql-driver.html#qmysql-for-mysql-4-and-higher if you were not success, go without mysql and afterwards look for completer documents on how to compile mysql plugin in Qt.



  • I found my problem. I did not set the correct include and lib path enviroment to point to mysql folders.
    Thanks to all.
    Harald.



  • Hallo sir..that is my problem also but after i sett the path correctly my problem is gone....but after that the new problem was coming...here is:

    Qt5Sqld.lib(Qt5Sqld.dll) : fatal error LNK1112: module machine type 'X86' confli
    cts with target machine type 'x64'
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\amd64\link.EXE"' : return code '0x458'
    Stop.

    Please help for your idea and solution....even i was trying to build it by using win32 compiler still can not...



  • It seems that you need the 64bit version of MySQL. Use http://www.mysql.com/downloads/mirror.php?id=412091. This is mysql-5.6.10-winx64.zip. The error code in the build shows that this should be taken into account. Let me know.

    [edit, link fixed, koahnig]



  • Thank you Mr HarrySatt. I tried as your suggestion but still the result is same as previous. And I was thinking may be is not about mysq. but is about Qt5 dll. Actually It can not generate the Qt5Sqld.lib to create the dll file because of it is compiled by 32 bit..instead of 64. and my computer is 64.

    the problem is I am not recompile the source of Qt5Sqld.lib rather than i just use the Qt5Sqld.lib to get dll file. so may i need to rebuild all of my qt5 32 bit library to become 64 bit. or maybe I need to download the 64 bit Qt5..

    till now I don't have any idea about this.



  • Hi.
    For sure you have to download the complete source code and compile for 64bit. For Visual Studio you use the 64bit command prompt in the Tools.. sub menu to do all the configure and nmake stuff. Then this schold build you the 64bit Qt5Sqld and Qt5Sql dlls with all the rest necessary for compiling Qt5. Be sure to use the last release which is Qt5.0.1 in the moment. For me it worked.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.