我试图查看这个annotation library,但它的makefile与QWidget有一个链接错误
In file included from src/AnnotationsPixmapWidget.h:4:
src/PixmapWidget.h:4:10: fatal error: 'QWidget' file not found
#include <QWidget>
^
makefile中没有提到这个小部件。
我尝试在这里添加类似的链接:
当我这样做时,它给了我一个权限错误,我猜它编译了一个已经存在的对象。
make
/usr/local/Cellar/qt5/5.3.1/lib/QtWidgets.framework/Versions/5/Headers/QWidget \
/usr/local/Cellar/qt5/5.3.1/lib/QtWidgets.framework/Versions/5/Headers/qwidget.h
make: /usr/local/Cellar/qt5/5.3.1/lib/QtWidgets.framework/Versions/5/Headers/QWidget: Permission denied
make: *** [src/tmp/AnnotationsPixmapWidget.o] Error 1
这是它所在的位置:
/usr/local/Cellar/qt5/5.3.1/lib/QtWidgets.framework/Versions/5/Headers/QWidget \
/usr/local/Cellar/qt5/5.3.1/lib/QtWidgets.framework/Versions/5/Headers/qwidget.h
Qt5Widgets.pc包文件似乎包含正确的目录:
Name: Qt5 Widgets
Description: Qt Widgets module
Version: 5.3.1
Libs: -F${libdir} -framework QtWidgets
Libs.private: -F/usr/local/Cellar/qt5/5.3.1/lib -framework QtGui -framework QtCore -framework Carbon -framework Cocoa -lz -framework OpenGL -framework AGL
Cflags: -I${includedir}/QtWidgets -I${includedir}
Requires: Qt5Core Qt5Gui
更新:尝试添加QT += widget
之类的Unknown module(s) in QT: widget
,但获取:# the target
TARGET = imgAnnotation
#DEFINES += NO_OPENCV # remove the '#' in order not to use opencv
OPENCV_ROOT = $(HOME)
#OPENCV_ROOT = c:/OpenCV2.0
#OPENCV_SUFFIX = 200
QT += widget
# some project options
TEMPLATE = app
CONFIG += release \
warn_on \
qt
# dirs for automatically generated files
MOC_DIR = src/tmp
OBJECTS_DIR = src/tmp
UI_DIR = src/ui
# source files
FORMS += src/*.ui
HEADERS += src/*.h \
src/geometry/*.h \
src/numeric/*.h
SOURCES += src/*.cpp
# lib/include dirs
INCLUDEPATH += src $${INCLUDEPATH}
# add opencv libraries and include path
!contains(DEFINES, NO_OPENCV) {
LIBS += -lcv$${OPENCV_SUFFIX} -lcxcore$${OPENCV_SUFFIX} -L$${OPENCV_ROOT}/lib
INCLUDEPATH += $${OPENCV_ROOT}/include
}
.pro文件
MutationResult
我真的不太了解makefile,我需要这个asap,否则id会打开这本书。 在哪里/如何将其添加到make文件中?
答案 0 :(得分:4)
模块名称为widgets
(复数),而不是widget
(单数)。