[英]Qt release application don't see plugin
I have a problem with release application, it is don't see psql driver if i start it by exe from explorer. 我的发布应用程序有问题,如果我从资源管理器中的exe启动它,则看不到psql驱动程序。 But it works perfect if i start it from visual studio...
但是如果我从Visual Studio启动它,它就完美了。
I place these files near exe, and no result: 我将这些文件放在exe附近,但没有结果:
unins000.dat
msvcp140.dll
qsqlpsql.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Network.dll
Qt5Sql.dll
vccorlib140.dll
Server.exe
unins000.exe
config.json
error: 错误:
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC ODBC3 QPSQL QPSQL7
but i compiled that plugin defore! 但我之前编译了该插件!
Whats can be wrong? 有什么问题吗?
To deploy qt application with plugins you should also add plugins in same folder as application. 要使用插件部署qt应用程序,您还应该在与应用程序相同的文件夹中添加插件。 How to deploy qt applications with plugins
如何使用插件部署Qt应用程序
You should also add platform folder near application to be able to deploy your application on computers where qt isn't available. 您还应该在应用程序附近添加平台文件夹,以便能够在无法使用qt的计算机上部署应用程序。
It's on Linux but same applies in windows.
它在Linux上,但在Windows中同样适用。 You can only add sqldrivers in plugins folder.
您只能在插件文件夹中添加sqldrivers。
qt.conf file contaians:
[Paths]
Plugins=plugins
Also run Dependency Walker to find all dependent libraries. 还要运行Dependency Walker来查找所有依赖库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.