|
sorry,i have no Chinise input software.
I din't known why this error occues.
Need help!
Thanks all the firends~:)
Te message as below:
[root@yixiaoyang first]# ls
first.cpp first.h first.png first.ui Makefile my_makefile
first.desktop first.o first.pro main.cpp moc_first.cpp ui2cpp
[root@yixiaoyang first]# make clean
rm -f first.o main.o moc_first.o /opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/image/opt/Qtopia/bin/first
rm -f *~ core
[root@yixiaoyang first]# ls
first.cpp first.desktop first.h first.png first.pro first.ui main.cpp Makefile moc_first.cpp my_makefile ui2cpp
[root@yixiaoyang 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
main.cpp: In function ‘QWidget* create_first(QWidget*, const char*, uint)’:
main.cpp:5: error: expected type-specifier before ‘first’
main.cpp:5: error: cannot convert ‘int*’ to ‘QWidget*’ in return
main.cpp:5: error: expected ‘;’ before ‘first’
main.cpp:5: error: ‘first’ was not declared in this scope
make: *** [main.o] Error 1
[root@yixiaoyang first]# cat main.cpp
#include "first.h"
#include <qapplication.h>
#include <qtopia/qpeapplication.h>
QTOPIA_ADD_APPLICATION("first",first)
QTOPIA_MAIN
[root@yixiaoyang first]#
now ,this is my Makefile, i think it is right~
#############################################################################
# Makefile for building first
# Generated by tmake at 07:08, 2010/10/01
# 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) $(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
|
|