我使用的是Qt5.9.1,在令一台机器上调试好的代码,换一台就不行了,一直报错:This application failed to start because it could not find or load the Qt platform plugin “windows”
in “”.
Reinstalling the application may fix this problem.
运行的时候具体报错如下图所示:
这里有两种解决方案,第一种使用windeployqt.exe,这种方法对我没用,具体的解决方案参考这个链接:解决 Qt5 报错 This application failed to start because it could not find or load the Qt platform plugin。
第二种方案使用dll动态库拷贝,需要拷贝两个地方,具体的方案参考这位博主的博客:QT移植无法启动 This application failed to start because it could not find or load the Qt platform plugin。
因为我也是代码换个平台就不好用,所以第二种解决方案解决了我的问题。