微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

尝试运行代码时在空QT项目中链接错误

如何解决尝试运行代码时在空QT项目中链接错误

当我使用QT Creator在开源QT版本的空项目中按“运行”时,发生链接错误: ''' lnk1104无法打开文件'qtmaind.lib' ''' 在安装过程中,我启用了“ MSVC 2017”和“ MinGW 5.3.0”选项,根据google的回答,应该可以解决此问题。

这是我的.pro文件

QT       += core gui
 
greaterThan(QT_MAJOR_VERSION,4): QT += widgets
 
CONfig += c++11
 
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked 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 it uses 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
 
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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。