I am working with 开发者_Python百科a Qt based Visual C++ application. In this project I have no problems with compile the code in Debug mode. When I am compiling this in Release mode, it shows the following error messages:
QSqlDatabase: QSQLITE driver not loaded
QSqlDatabase: available drivers:
"[15:42:21.042] CDataHandler |0x05b0| - FATAL: Could not connect to database..."
[15:42:21.042] CDataHandler |0x05b0| - FATAL: Could not connect to database...
The program '[868] AS399x_Reader_Suite.exe: Native' has exited with code 1 (0x1).
What might be the reason for this error?
I checked with the Qt installation, Sqlite plugin is installed.
If it is not installed means, then it should also show this same error in debug mode?
It doesn't seem like a compile error, but a runtime error.
According to the error message, you are trying to load the SQLite driver and it cannot find it. Check your Qt installation to make sure you have the SQLite plugin installed (it likely needs to be compiled in release as well).
See http://doc.trolltech.com/4.7/sql-driver.html#qsqlite for more details.
精彩评论