QT MySql connectivity using Windows XP, Qt Creator 4.5.2(windows 32 bit)

风格不统一 提交于 2019-11-29 15:11:07

I recommend reading the following excellent guide: http://christopher.rasch-olsen.no/2009/04/14/qt-45-and-mysql-plugin-with-mingw-on-windows-xp/ (with comments) - it helped me to solve exactly the same problem.

You need to build the Qt/MySQL driver. See the documentation.

The output in my pc as instructed in the documentation is:

*C:>cd C:\qt-win-opensource-src-4.5.2\src\plugins\sqldrivers\mysql

C:\qt-win-opensource-src-4.5.2\src\plugins\sqldrivers\mysql>qmake -o Makefile "INCLUDEPATH+=C:\mysql-5.1.39-win32\include" "LIBS+=C:\mysql-5.1.39-win32\lib\opt\LIBMYSQL.LIB" mysql.pro

C:\qt-win-opensource-src-4.5.2\src\plugins\sqldrivers\mysql>"C:\Program Files\Microsoft Visual Studio 8\VC\bin\nmake"

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved.

    "C:\Program Files\Microsoft Visual Studio 8\VC\bin\nmake.exe" -f Makefile.Debug all

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved.

    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189

-DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FRO M_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I". .......\include\QtCore" -I"........\include\QtSql" -I"........\include" -I"c:\mysql-5.1.39-win32\include" -I"........\include\ActiveQt" -I"tmp\moc\d ebug_shared" -I"........\mkspecs\win32-msvc2005" -Fotmp\obj\debug_shared\ @C: \DOCUME~1\test\LOCALS~1\Temp\nm38.tmp

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\bin\c l.EXE"' : return code '0xc0000135' Stop.

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\bin\n make.exe"' : return code '0x2'*

What might be the problem? Is it the nmake or something else? I did go through the web but I'm stuck here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!