Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 使用PSQL数据库的Qt发布应用程序-加载驱动程序时出错_Windows_Qt_Psql - Fatal编程技术网

Windows 使用PSQL数据库的Qt发布应用程序-加载驱动程序时出错

Windows 使用PSQL数据库的Qt发布应用程序-加载驱动程序时出错,windows,qt,psql,Windows,Qt,Psql,使用QtCreator(版本57),我创建了一个连接到DB并等待通知的简单应用程序。它没有太多代码,所有代码都在LINUX上工作: MyDataBase = new QSqlDatabase(QSqlDatabase::addDatabase("QPSQL", "Main")); 不幸的是,在从Linux过渡到Windows(mainy将使用哪个应用程序)之后,我遇到了一些问题。通常情况下,会丢失dll,但这些dll很快(复制粘贴给定的.dll)。现在我仍然无法在Windows上运行它,因为它

使用QtCreator(版本57),我创建了一个连接到DB并等待通知的简单应用程序。它没有太多代码,所有代码都在LINUX上工作:

MyDataBase = new QSqlDatabase(QSqlDatabase::addDatabase("QPSQL", "Main"));
不幸的是,在从Linux过渡到Windows(mainy将使用哪个应用程序)之后,我遇到了一些问题。通常情况下,会丢失dll,但这些dll很快(复制粘贴给定的.dll)。现在我仍然无法在Windows上运行它,因为它拒绝连接到db。使用系统变量,我设法找到了更多。现在,即使我看到了错误,我也无法理解我还能做些什么来让它工作:

Found metadata in lib C:/_Qt/5.7/mingw53_32/plugins/sqldrivers/qsqlpsqld.dll, metadata=
{
    "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
    "MetaData": {
        "Keys": [
            "QPSQL7",
            "QPSQL"
        ]
    },
    "className": "QPSQLDriverPlugin",
    "debug": true,
    "version": 329472
}
“插件'C://_Qt/5.7/mingw53_32/plugins/sqldrivers/qsqlpsqld.dll'使用了不兼容的Qt库。(不能混合使用调试库和发布库。) 不是插件

QFactoryLoader::QFactoryLoader() checking directory path "D:/QT_Notifi/build-Notifier-Desktop_Qt_5_7_0_MinGW_32bit-Release/release/sqldrivers" ...
loaded library "C:/_Qt/5.7/mingw53_32/plugins/sqldrivers/qsqlpsql.dll"

QLibraryPrivate::loadPlugin failed on "C:/_Qt/5.7/mingw53_32/plugins/sqldrivers/qsqlpsql.dll" : "Cannot load library C:\\_Qt\\5.7\\mingw53_32\\plugins\\sqldrivers\\qsqlpsql.dll: %1 is not correct application of Win32."

QSqlDatabase: QPSQL driver not loaded

QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7