簡體   English   中英

Qt Creator無法構建

[英]Qt Creator won't build

我的任務是將QtCreator中構建的項目轉換為.NET。

我要做的第一件事是在QtCreator中構建項目,以便我可以逐步執行該項目以遵循流程並查看其中的一些變量(實際值)。

在構建時,會出現很多這樣的錯誤:

error: C1083: Cannot open include file: 'QFrame': No such file or directory
error: C1083: Cannot open include file: 'QMainWindow': No such file or directory
error: C1083: Cannot open include file: 'QSpinBox': No such file or directory

當我搜索驅動器時,確實找到了“ QFrame”,但是在其中包含類似以下內容的路徑中:

android_armv7
msvc2013_64
winphone_x86
winrt_x64

這是我的.pro文件

TEMPLATE = app

CONFIG *= warn_on
CONFIG(debug, debug|release): CONFIG *= console

QT += widgets

#------------------------------------------------------------
# Source Files
#------------------------------------------------------------

FORMS += \
    GUIDemo.ui \
    Registration.ui \

HEADERS += \
    CustomFrames.h \
    GUIDemo.h \
    MultiRadar.h \
    QControlUtils.h \
    ScannerInfo.h \
    TabAdvanced.h \
    TabBScan.h \
    TabGuardZone.h \
    TabImage.h \
    TabInstallation.h \
    TabPPI.h \
    TabTargets.h \

SOURCES += \
    CustomFrames.cpp \
    GUIDemo.cpp \
    MultiRadar.cpp \
    QControlUtils.cpp \
    ScannerInfo.cpp \
    TabAdvanced.cpp \
    TabBScan.cpp \
    TabGuardZone.cpp \
    TabImage.cpp \
    TabInstallation.cpp \
    TabPPI.cpp \
    TabTargets.cpp \
    main.cpp \

#------------------------------------------------------------
# Include directories
#------------------------------------------------------------

INCLUDES = \
    ../../include \


#------------------------------------------------------------
# UI Generation
#------------------------------------------------------------

CONFIG(debug,   debug|release): TARGET_DIR = debug
CONFIG(release, debug|release): TARGET_DIR = release

UI_DIR = GeneratedFiles
MOC_DIR = $${UI_DIR}/$${TARGET_DIR}
INCLUDEPATH += $${UI_DIR}

#------------------------------------------------------------
# Libraries
#------------------------------------------------------------

LIBS += \
    -L../../lib/$${TARGET_DIR} \
    -lNRPClient \
    -lNRPPPI \

#------------------------------------------------------------
# Final config
#------------------------------------------------------------

#set the qmake variables
DEPENDPATH += $$INCLUDES
INCLUDEPATH += $$INCLUDES

INCLUDES指示的文件夾在那里,並且包含一堆項目特定的頭文件。

我感到我缺少QtCreator的某些部分,該部分使我無法為Win7進行構建。

Qt Creator只是IDE。 您還需要安裝Qt庫 ,因此請確保已安裝它們。

這些錯誤表明項目的.pro文件應添加widgets模塊:

QT += widgets

這樣可以確保項目在Qt 5.x上包含正確的包含目錄(具有QFrame等的包含目錄)和庫目錄。

編輯:

經過一番交談,我們發現已安裝了MS2010的Qt SDK,但是由於OP的包裝盒中裝有MS2013,解決問題的是下載並安裝了MS2013的Qt SDK。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM