Qt项目设置为版本5,但qtcreator仍在寻找qt4头文件?

时间:2014-05-28 16:05:49

标签: c++ qt

以下是项目视图的截图:

enter image description here

这是.pro文件

#-------------------------------------------------
#
# Project created by QtCreator 2014-05-18T15:34:14
#
#-------------------------------------------------

QT       += core

QT       -= gui

TARGET = bedcoll
CONFIG   += console
CONFIG   -= app_bundle
QMAKE_CC = clang
QMAKE_CXX = clang++
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -D_FILE_OFFSET_BITS=64
INCLUDEPATH += /usr/include/c++/4.8
INCLUDEPATH += /usr/include/boost
LIBS += -lboost_system
LIBS += -lboost_filesystem
LIBS += -lboost_program_options

TEMPLATE = app


SOURCES += \
    src/util.cpp \
    src/bedcoll.cpp \
    src/main.cpp

HEADERS += \
    src/collgen_memo.h \
    src/util.h \
    src/bedcoll.h \
    src/error_enum.h

此项目在kubuntu 13.10中没有任何问题,但在升级到14.04后,它会出现以下错误:

/usr/include/qt4/QtCore/qstring.h:1045: error: undefined reference to `QString::toAscii() const'
/usr/include/qt4/QtCore/qstring.h:880: error: undefined reference to `QString::free(QString::Data*)'
/usr/include/qt4/QtCore/qstring.h:879: error: undefined reference to `QString::shared_null'

Kubuntu 14.04默认发布qt5,但qtcreator仍然在寻找qt4,非常混乱。

1 个答案:

答案 0 :(得分:1)

@Netjat是对的,清理解决问题,实际上有一个快捷方式,只需右键单击项目并选择“重建”。