Qt 可执行错误 - dll 库
Qt executable error- dll library
一个Qt应用程序在从QtCreator执行时完美运行,当我尝试从调试文件夹(没有QtCreator)执行它时不会运行。它要求很多.dll文件,我一个接一个地下载它们,并添加到调试文件夹中。现在我得到了错误:
The program can't start because libwinpthread-1.dll is missing from your computer.
Try reinstalling the program to fix this problem.
我在互联网上的任何地方都找不到libwinpthread-1.dll。我做错了什么?
可执行文件的路径为:
C:QtToolsQtCreatorbinbuild-SimpleText1_3-Desktop_Qt_5_2_1_MinGW_32bitDebug
项目文件:
#-------------------------------------------------
#
# Project created by QtCreator 2014-04-04T14:29:48
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = SimpleText1_3
TEMPLATE = app
SOURCES += main.cpp
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
CONFIG += console c++11
QMAKE_CXXFLAGS += -std=c++11
和主要.cpp:
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
当您在Qt Creator中运行应用程序时,一切都很好,但是当您从调试文件夹中运行.exe文件时,会出现dll丢失错误。是真的!首先将Qt Creator设置为发布模式。您必须将这些dll和文件夹复制到"释放"文件夹:
platforms --> Folder
icudt52.dll
icuin52.dll
icuuc52.dll
msvcp110.dll
msvcr110.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll
上面的dll是Visual Studio编译器和唯一的Core和GUI库。
祝你好运。亚阿里。
转到以下Qt文档链接:https://wiki.qt.io/Deploy_an_Application_on_Windows。请严格按照说明进行操作。 我不必做粗暴的方法。 我确实收到了缺少环境变量的警告,但围栏确实有效。请注意发布版本与调试版本。
相关文章:
- 错误:当我从"WinDbg"打开可执行文件时,找不到符号文件。默认导出 ntdll 的符号.dll
- 发生此错误:在0x0F2BFB7C(基于.dll)时引发异常 尝试更改大小是问题吗?
- 在Embarcadero C++ Builder中生成的DLL未解决的外部链接错误
- 链接库错误 c/缺少 dll/错误版本?
- Python - 从 c++ DLL 错误打印值
- C++ 动态加载 DLL 错误
- 生成 DLL 错误
- 从服务器下载DLL-不是有效的DLL(错误)
- Windows 8上的.exe文件中的MSVCR90.dll错误 - 应用程序无法正确启动(0xc000007b)
- Expat XML解析器(静态链接,DLL错误(缺少Define?)
- openCV_FFMPEG **.opencv 2.4.11中的dll错误,用于IP摄像机访问
- 如果实际导出"ordinal N not found in DLL"错误,可能导致什么原因?
- 为什么我得到的信息不可用,没有加载符号 d3d11.dll错误
- Visual Studio c++ MSVCR100.dll错误运行时
- dll错误:试图读取或写入受保护的内存
- 如何修复msvcp120 .dll错误Visual Studio 2015
- c#中无法加载64位dll错误
- Qt释放DLL错误
- 错误:无法加载dll.错误值193
- 启动 MinGW 编译的 exe 时缺少 libgcc_s_dw2-1.dll 错误