首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Windows上的Qt部署错误0xc0000007b

Windows上的Qt部署错误0xc0000007b
EN

Stack Overflow用户
提问于 2019-03-21 16:33:01
回答 2查看 449关注 0票数 0

我有一个Qt 5.12的Windows应用程序。我使用的是Qt Creator和Mingw 64位。我已经部署了windeployqt.exe的应用程序。当我启动它时,应用程序需要libgcc_s_seh-1.dll文件。在我将其粘贴到目录中之后,我得到0xc000007b错误。我运行了Dependency Walker,它给出了以下错误:

代码语言:javascript
复制
Error: At least one required implicit or forwarded dependency was not found.
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.
Error: A circular dependency was detected.
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.

这是我的.pro文件

代码语言:javascript
复制
QT += core gui network

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Control
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
QMAKE_LFLAGS += -static-libgcc


##CONFIG += c++11
##QMAKE_CXXFLAGS += -std=c++0x
SOURCES += \
        main.cpp \
        mainwindow.cpp

HEADERS += \
        mainwindow.h

FORMS += \
        mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

有人能帮我吗?非常感谢。

EN

回答 2

Stack Overflow用户

发布于 2019-03-21 18:03:30

我以前也遇到过类似的问题,但我不太确定这是否是相同的原因,因为我是用MVSC编译的。

在我的例子中,应用程序内部链接到x86依赖文件。我做了download,安装了x64依赖文件,并链接到x64文件。

无论如何,老版本的Dependency Walker在处理64位EXE或DLL时不知道跳过PATH中的32位DLL,所以有些错误并不重要。您可以在此post中找到更多信息。

如果问题仍然存在,请根据此post尽量避免使用静态版本的libgcc。它不是被设计成静态链接的。

代码语言:javascript
复制
...
#QMAKE_LFLAGS += -static-libgcc
...
票数 1
EN

Stack Overflow用户

发布于 2019-03-22 14:02:30

当编译的应用程序看不到Qt dlls时,我得到了这个错误,所以请检查你的路径。也可能是它找不到其他的gcc dll,比如libwinpthread-1.dll

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

https://stackoverflow.com/questions/55276395

复制
相关文章

相似问题

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