Qt + Mysql Embedded, compiles fine but crashes (exit code 1) on db.open() call
-
wrote on 26 Feb 2011, 22:52 last edited by
Hello all,
I'm trying to work with mysql Embedded drive on qt using VS2010.. everything compiles well, and the dll seem to lead fine, here is the output:
@
'QTMysqlTest.exe': Loaded 'C:\Deve\CPP\QTDBLayer\QTMysqlTest.exe', Symbols loaded.
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'D:\Deve\QT\qt4.7.1\bin\QtCored4.dll', Symbols loaded.
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Deve\QT\qt4.7.1\bin\QtSqld4.dll', Symbols loaded.
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'D:\Deve\QT\qt4.7.1\plugins\sqldrivers\qsqlmysqld4.dll', Symbols loaded.
'QTMysqlTest.exe': Loaded 'C:\mysql-5.1.30-win32\Embedded\DLL\debug\libmysqld.dll', Symbols loaded. //notice it's loading this dll, no path issue
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\nlaapi.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\mswsock.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\dnsapi.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\winrnr.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\NapiNSP.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\pnrpnsp.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\wshbth.dll', Cannot find or open the PDB file
'QTMysqlTest.exe': Loaded 'C:\Windows\SysWOW64\rasadhlp.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x1688) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x154c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1524) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1230) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x16e8) has exited with code 1 (0x1).
The program '[5484] QTMysqlTest.exe: Native' has exited with code 1 (0x1).
@here is the code:
@
#include <QtCore/QCoreApplication>
#include <QtSql>
#include <QtDebug>int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QString connectionName = "DbThread-" + QDateTime::currentDateTime().toString("yyyyMMddhhmmsszzz");
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL", connectionName);
db.setHostName("localhost");
db.setDatabaseName("mysql");
db.setUserName("root");
db.setPassword("root");
bool gotOk = false;
gotOk = db.open(); //crashes here
if( gotOk )
{
qDebug() << db.lastError();
qFatal( "Failed to connect." );
}
else
{
qDebug() << db.connectionName();
}db.close();
return 0;
}
@
sqlite works fine, BTW, so I'm not sure that the windows 7 64bit has any effect here.
also, note that I'm using both in the test and in the qt libraries with Runtime Libraries flag /MTd and not /MDd so it might be there.any ideas?
Thanks -
wrote on 23 Sept 2011, 18:30 last edited by
I have the same problem, where u able to find a solution?
Thanks
-
wrote on 23 Sept 2011, 19:56 last edited by
Well, it's getting late but is it possible that you are the OP of this thread?
-
wrote on 23 Sept 2011, 20:07 last edited by
OMG! u are right, I feel so stupid, sorry.
I wrote a new thread with a more up to date status, it was moved by the moderator to "this place":http://developer.qt.nokia.com/forums/viewthread/10027/
-
wrote on 18 Jun 2014, 07:22 last edited by
Hi i m new into .Net environment I'm facing this issue when I m trying to build an desktop application.
Error 2 The command ""C:\Program Files (x86)\Microsoft\ILMerge\ilmerge.exe" /target:winexe /out:E:\DotNet\blu - Bulk Lead Upload -Apsar\2012-08-30.01-d-vs-pc-dg-all\BulkLeadUpload\BulkLeadUpload\bin\Release........\publish\BulkLeadUploadSingleV1.0.exe E:\DotNet\blu - Bulk Lead Upload -Apsar\2012-08-30.01-d-vs-pc-dg-all\BulkLeadUpload\BulkLeadUpload\bin\Release\BulkLeadUpload.exe E:\DotNet\blu - Bulk Lead Upload -Apsar\2012-08-30.01-d-vs-pc-dg-all\BulkLeadUpload\BulkLeadUpload\bin\Release....\dll\MySql.Data.dll" exited with code 1. BulkLeadUpload
-
Hi and welcome to devnet,
What does it have to do with Qt ?