|
错误信息:
错误说:moc_first.cpp:15:34: error: private/qucomextra_p.h: No such file or directory
我到目录下看了,真的没有这个头文件
但是这个moc_first是ui2cpp产生的啊
这个问题怎么解决
附件是我的根据手册产生的Makefile
各位看看
这是什么情况造成的?
[root@EmbedSky first]# make
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/include -o first.o first.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/include -o main.o main.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include -I/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/include -o moc_first.o moc_first.cpp
moc_first.cpp:15:34: error: private/qucomextra_p.h: No such file or directory
moc_first.cpp:17:2: error: #error "This file was generated using the moc from 3.3.8b. It"
moc_first.cpp:18:2: error: #error "cannot be used with the include files from this version of Qt."
moc_first.cpp:19:2: error: #error "(The moc has changed too much.)"
moc_first.cpp:28: error: ‘QMetaObjectCleanUp’ does not name a type
moc_first.cpp: In static member function ‘static QString first::tr(const char*, const char*)’:
moc_first.cpp:34: error: ‘DefaultCodec’ is not a member of ‘QApplication’
moc_first.cpp: At global scope:
moc_first.cpp:39: error: no ‘QString first::trUtf8(const char*, const char*)’ member function declared in class ‘first’
moc_first.cpp: In static member function ‘static QMetaObject* first::staticMetaObject()’:
moc_first.cpp:55: error: ‘QUMethod’ does not name a type
moc_first.cpp:56: error: ‘QUMethod’ does not name a type
moc_first.cpp:58: error: ‘slot_0’ was not declared in this scope
moc_first.cpp:59: error: ‘slot_1’ was not declared in this scope
moc_first.cpp:60: error: too many initializers for ‘const QMetaData’
moc_first.cpp:60: error: too many initializers for ‘const QMetaData’
moc_first.cpp:69: error: no matching function for call to ‘QMetaObject::new_metaobject(const char [6], QMetaObject*&, const QMetaData [2], int, int, int, int, int)’
/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include/qmetaobject.h:197: note: candidates are: static QMetaObject* QMetaObject::new_metaobject(const char*, const char*, QMetaData*, int, QMetaData*, int, QClassInfo*, int)
/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qt2/include/qmetaobject.h:200: note: static QMetaObject* QMetaObject::new_metaobject(const char*, const char*, QMetaData*, int, QMetaData*, int)
moc_first.cpp:70: error: ‘cleanUp_first’ was not declared in this scope
moc_first.cpp: At global scope:
moc_first.cpp:74: error: no ‘void* first::qt_cast(const char*)’ member function declared in class ‘first’
moc_first.cpp:81: error: ‘QUObject’ has not been declared
moc_first.cpp:81: error: no ‘bool first::qt_invoke(int, int*)’ member function declared in class ‘first’
moc_first.cpp:92: error: ‘QUObject’ has not been declared
moc_first.cpp:92: error: no ‘bool first::qt_emit(int, int*)’ member function declared in class ‘first’
make: *** [moc_first.o] Error 1
下面贴出的是makefile文件
#############################################################################
# Makefile for building first
# Generated by tmake at 08:47, 2011/11/13
# Project: first
# Template: app
#############################################################################
####### Compiler, tools and options
CC = gcc
CXX = g++
CFLAGS = -pipe -Wall -W -O2 -DNO_DEBUG
CXXFLAGS= -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG
INCPATH = -I$(QTDIR)/include -I$(QPEDIR)/include
LINK = g++
LFLAGS =
LIBS = $(SUBLIBS) -L$(QPEDIR)/lib -L$(QTDIR)/lib -lqpe -lqtopia -lqte
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
TAR = tar -cf
GZIP = gzip -9f
####### Files
HEADERS = first.h
SOURCES = first.cpp \
main.cpp
OBJECTS = first.o \
main.o
INTERFACES = first.ui
UICDECLS = first.h
UICIMPLS = first.cpp
SRCMOC = moc_first.cpp
OBJMOC = moc_first.o
DIST =
TARGET = $(QPEDIR)/image/opt/Qtopia/bin/first
DESKTOP = $(QPEDIR)/image/opt/Qtopia/apps/EmbedSky/first.desktop
ICON = $(QPEDIR)/image/opt/Qtopia/pics/first.png
INTERFACE_DECL_PATH = .
####### Implicit rules
.SUFFIXES: .cpp .cxx .cc .C .c
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
####### Build rules
all: $(TARGET)
cp -f first.desktop $(DESKTOP)
cp -f first.png $(ICON)
$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)
moc: $(SRCMOC)
tmake: Makefile
Makefile: first.pro
tmake first.pro -o Makefile
dist:
$(TAR) first.tar first.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) first.tar
clean:
-rm -f $(OBJECTS) $(OBJMOC) $(DESKTOP) $(ICON) $(TARGET)
-rm -f *~ core
####### Sub-libraries
###### Combined headers
####### Compile
first.o: first.cpp \
first.h \
first.ui
main.o: main.cpp \
first.h \
/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/include/qtopia/qpeapplication.h
first.h: first.ui
$(UIC) first.ui -o $(INTERFACE_DECL_PATH)/first.h
first.cpp: first.ui
$(UIC) first.ui -i first.h -o first.cpp
moc_first.o: moc_first.cpp \
first.h
moc_first.cpp: first.h
$(MOC) first.h -o moc_first.cpp |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|