今天我有重新做了一边,用uic生成的cpp和h文件在windos下也看不到代码,
gotocelldialog.cpp的内容是(linux和windows下都一样):
/****************************************************************************
** Form implementation generated from reading ui file 'gotocelldialog.ui'
**
** Created: Sat Jul 14 14:46:09 2007
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "gotocelldialog.h"
gotocelldialog.h的内容
/****************************************************************************
** Form interface generated from reading ui file 'gotocelldialog.ui'
**
** Created: Sat Jul 14 14:45:51 2007
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
因为这是<<C++ GUI Qt3 编程>>上的例子,所以我那光盘提供的.ui和main.cpp来试还是一样,然后我用progen和tmake工具来生成.pro和Makefile(随便说一下,我的Qt是2.3.2的 tmake是1.13的).
运行make后的错误跟昨天的一样:
这是错误信息:
[root@localhost gotocell]# make
Makefile:125: warning: overriding commands for target `gotocelldialog.h'
Makefile:119: warning: ignoring old commands for target `gotocelldialog.h'
Makefile:149: warning: overriding commands for target `gotocell/moc_gotocelldialog.cpp'
Makefile:143: warning: ignoring old commands for target `gotocell/moc_gotocelldialog.cpp'
Makefile:152: warning: overriding commands for target `moc_gotocelldialog.cpp'
Makefile:146: warning: ignoring old commands for target `moc_gotocelldialog.cpp'g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I/root/2410sQt/qt-2.3.10/include -o gotocell/gotocelldialog.o gotocell/gotocelldialog.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I/root/2410sQt/qt-2.3.10/include -o gotocell/main.o gotocell/main.cpp
gotocell/main.cpp: In function `int main(int, char**)':
gotocell/main.cpp:8: `GoToCellDialog' undeclared (first use this function)
gotocell/main.cpp:8: (Each undeclared identifier is reported only once for each
function it appears in.)
gotocell/main.cpp:8: `dialog' undeclared (first use this function)
gotocell/main.cpp:8: parse error before `;' token
make: *** [gotocell/main.o] Error 1
我用uic gotocelldialog.ui 的信息:
[root@localhost gotocell]# uic gotocelldialog.ui
/****************************************************************************
** Form interface generated from reading ui file 'gotocelldialog.ui'
**
** Created: Sat Jul 14 14:22:45 2007
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
[root@localhost gotocell]#
斑竹,为什么昨天我生成的cpp和h文件在windows下可以看的到源代码,但今天的却不行呢,另外请斑竹和其他网友帮我看看错误信息,谢谢各位!这些信息都是今天的
注:以上的信息都是今天重新实验的记录,因为昨天的那个被我给弄坏了,不过make的错误和uic gotocelldialog.ui是一样的.