• 7310阅读
  • 0回复

【提问】请问,我照着Qt文档里 Creating a Main Window Application编写程序,出错信息如下: [复制链接]

上一主题 下一主题
离线zeckey
 

只看楼主 正序阅读 楼主  发表于: 2006-02-12
【提问】请问,我照着Qt文档里 Creating a Main Window Application编写程序,出错信息如下:
【提问】请问,我照着Qt文档里 Creating a Main Window Application编写程序,出错信息如下:
这是在Redhat9.0下Qt3.1
这是在该文档里"Building and Running
We now have some code in the application and a main.cpp containing the main() function, so we should be able to compile, link and run the application.
Click File|Save to ensure that all our work is saved to disk. Open a console (e.g. an xterm or DOS window), change directory to where you have saved the colortool project, and run qmake to generate a Makefile:"

# qmake -o Makefile colortool.pro

# make
                                                   
/usr/lib/qt-3.1/bin/uic mainform.ui -o .ui/mainform.h
g++ -c -pipe -Wall -W -O2 -march=i386 -mcpu=i686 -g -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG -I/usr/lib/qt-3.1/mkspecs/default -I. -I/usr/lib/qt-3.1/include -I.ui/ -I.moc/ -o .obj/main.o main.cpp
/usr/lib/qt-3.1/bin/uic mainform.ui -i mainform.h -o .ui/mainform.cpp
g++ -c -pipe -Wall -W -O2 -march=i386 -mcpu=i686 -g -DGLX_GLXEXT_LEGACY -fno-use-cxa-atexit -fno-exceptions -DQT_NO_DEBUG -I/usr/lib/qt-3.1/mkspecs/default -I. -I/usr/lib/qt-3.1/include -I.ui/ -I.moc/ -o .obj/mainform.o .ui/mainform.cpp
In file included from .ui/mainform.cpp:32:
mainform.ui.h: In member function `void MainForm::init()':
mainform.ui.h:24: `findForm' undeclared (first use this function)
mainform.ui.h:24: (Each undeclared identifier is reported only once for each
  function it appears in.)
mainform.ui.h:25: `loadSettings' undeclared (first use this function)
In file included from .ui/mainform.cpp:32:
mainform.ui.h: In member function `virtual QPixmap
  MainForm::colorSwatch(QColor)':
mainform.ui.h:131: aggregate `QPainter painter' has incomplete type and cannot
  be defined
make: *** [.obj/mainform.o] Error 1

帮帮忙阿
[ 此贴被zeckey在2006-02-12 14:32重新编辑 ]
快速回复
限100 字节
 
上一个 下一个