首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Qt -找不到或加载平台插件"windows“-但它就在那里!-动态构建

Qt -找不到或加载平台插件"windows“-但它就在那里!-动态构建
EN

Stack Overflow用户
提问于 2015-06-16 10:38:42
回答 1查看 1.5K关注 0票数 2

错误消息:

代码语言:javascript
复制
This application failed to start because it could not find or load the Qt platform plugin "windows".

Reinstalling the application may fix the problem.

我做了很多搜索,但我找到的解决方案都没有奏效。

我遵循了这个“在Windows上部署应用程序 --即使是快速而肮脏的方法也失败了。

我有/platforms/qwindows.dll 在我的应用根目录中

我使用了我们都知道也很喜欢的依赖步行程序depend.exe

代码语言:javascript
复制
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

坦白说我不明白..。语言障碍?它说这里缺少DLL,DCOMP.dllAPI-MS-WIN-APPMODEL-RUNTIME-L1-1-0-.dllAPI-MS-WIN-CORE-WINRT -ERROR-L1-1-0, -L1-1-0, -ROBUFFER-L1-1-0, -STRING-L1-1-0.DLL and API-MS-WIN-SHCORE-SCALING-l1-1-0.dll,但是它们在哪里都找不到。kernel.dll和MSVCRT.dll中包含了同名的dll。它还提到了IESHIMS.dll,但包括它并没有什么区别。

我的文件夹中有以下dll:

  • /platforms/qwindows.dll
  • icuin53.dll
  • icudt53.dll
  • icuuc53.dll
  • libEGL.dll (尽管我的应用程序不使用它)
  • libgcc_s_dw2-1.dll
  • libopencv_core2410.dll
  • libopencv_highgui2410.dll
  • libopencv_imgproc2410.dll
  • libstdc++-6.dll
  • IEShims.dll
  • libwinpthread-1.dll
  • Qt5Core.dll
  • Qt5Gui.dll
  • Qt5Widgets.dll

C:\Qt\5.4.0\5.4\mingw491_32复制

exe的调试版本存在一个相同的问题,它带有*d.dll库。

我在Windows764位上使用QT5.4.0和Mingw32 4.9.1 .

这个应用程序显然是在我的上网本上编译和运行的,每一台电脑都会给我错误,但是我必须分发它。当我将C:\Qt更改为不同的文件夹名时,我的上网本也会产生错误。

奇怪的是,很少版本的应用程序,没有任何问题。从那以后,我已经添加了大量的代码,但是我不记得任何使用不同库的代码。

可能会有什么问题?

EN

回答 1

Stack Overflow用户

发布于 2015-06-16 12:24:10

问题不在于图书馆。问题是密码的问题。在main.cpp中遗漏了一行,默认情况下不包括行,但应该是main.cpp()函数的第一行。

QCoreApplication::addLibraryPath("./");

代码语言:javascript
复制
int main(int argc, char *argv[])
{
    QCoreApplication::addLibraryPath("./"); //this goddamn line right here
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30865224

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档