vs2017-Qt错误“This application failed to start because it could not find or load the Qt platform plugin”

环境

vs2017+Qt5.9+qt-vsaddin-msvc2017-2.4.0

问题

使用Debug+x64编译运行没有问题,改为Release时出现了下面的错误
vs2017-Qt错误“This application failed to start because it could not find or load the Qt platform...“

解决方法

exe输出目录(项目/x64/Release/)缺少了dll文件,缺少的文件依据项目不同而不同

①将Qt目录中的bin目录文件全部复制到Release文件夹
②vs2017中运行项目,再次报错,不要停止项目

vs2017-Qt错误“This application failed to start because it could not find or load the Qt platform...“

③回到Release文件夹,右键空白处,撤回复制,提示有几个文件正在占用中,都点击跳过
④停止运行项目,重新生成运行,成功!

vs2017-Qt错误“This application failed to start because it could not find or load the Qt platform...“

参考链接:Qt5.8.0运行显示This application failed to start because it could not find or load the Qt platform plugin

相关文章:

  • 2021-07-21
  • 2022-12-23
  • 2021-06-28
  • 2022-01-16
  • 2021-05-14
  • 2021-04-17
  • 2022-12-23
猜你喜欢
  • 2021-07-30
  • 2021-08-22
  • 2022-12-23
  • 2021-07-12
  • 2021-05-11
  • 2021-10-24
  • 2021-09-26
相关资源
相似解决方案