GTK入门教程、GTK详解、Anjuta中文手册(更新中)
完全按书上写的代码
wangjun@wj-dt:~/qt/qt-book-test/chap02/gotocell2$ ls
gotocell2.pro gotocelldialog.h main.cpp
gotocelldialog.cpp gotocelldialog.ui
qmake -project
qmake-qt4 gotocell2.pro
然后make
/usr/bin/uic-qt4 gotocelldialog.ui -o ui_gotocelldialog.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o main.o main.cpp
g++ -Wl,-O1 -o gotocell2 main.o -L/usr/lib -lQtGui -lQtCore -lpthread
main.o: In function `main':
main.cpp:(.text+0x51): undefined reference to `GoToCellDialog::GoToCellDialog(QWidget*)'
collect2: ld returned 1 exit status
make: *** [gotocell2] 错误 1
开始以为自己那里抄写错误,就在网上下了源代码后直接编译,也是提示这个错误
我就接着编译其他例子,也会提示这种错误
这种情况就应该是为自己Qt的问题了
求助!!!
附件: |
文件注释: qt源码,各位可以帮为看看除了什么问题 gotocell2.tar.gz [1.19 KiB] 被下载 6 次 |
作者: wangjun403 发布时间: 2009-11-09
lee@lee-laptop:~/c$ make
/usr/bin/qmake-qt4 -unix -o Makefile c.pro
gcc -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o micro.o micro.c
micro.c: In function ‘main’:
micro.c:16: error: expected expression before ‘[’ token
micro.c:20: error: subscripted value is neither array nor pointer
micro.c:23: error: expected declaration or statement at end of input
micro.c:23: error: expected declaration or statement at end of input
make: *** [micro.o] 错误 1
好心人帮忙~
作者: liguanyao 发布时间: 2009-11-10
看下一章,就有了。
作者: sclzmbie 发布时间: 2009-11-13
作者: md5xwl 发布时间: 2009-11-17
qmake-qt4 &&
make
看看
作者: tusooa 发布时间: 2010-01-28
作者: black_cx 发布时间: 2010-09-05
完全按书上写的代码
wangjun@wj-dt:~/qt/qt-book-test/chap02/gotocell2$ ls
gotocell2.pro gotocelldialog.h main.cpp
gotocelldialog.cpp gotocelldialog.ui
qmake -project
qmake-qt4 gotocell2.pro
然后make
/usr/bin/uic-qt4 gotocelldialog.ui -o ui_gotocelldialog.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o main.o main.cpp
g++ -Wl,-O1 -o gotocell2 main.o -L/usr/lib -lQtGui -lQtCore -lpthread
main.o: In function `main':
main.cpp:(.text+0x51): undefined reference to `GoToCellDialog::GoToCellDialog(QWidget*)'
collect2: ld returned 1 exit status
make: *** [gotocell2] 错误 1
开始以为自己那里抄写错误,就在网上下了源代码后直接编译,也是提示这个错误
我就接着编译其他例子,也会提示这种错误
这种情况就应该是为自己Qt的问题了
求助!!!
附件: |
文件注释: qt源码,各位可以帮为看看除了什么问题 gotocell2.tar.gz [1.19 KiB] 被下载 6 次 |
作者: wangjun403 发布时间: 2009-11-09
lee@lee-laptop:~/c$ make
/usr/bin/qmake-qt4 -unix -o Makefile c.pro
gcc -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o micro.o micro.c
micro.c: In function ‘main’:
micro.c:16: error: expected expression before ‘[’ token
micro.c:20: error: subscripted value is neither array nor pointer
micro.c:23: error: expected declaration or statement at end of input
micro.c:23: error: expected declaration or statement at end of input
make: *** [micro.o] 错误 1
好心人帮忙~
作者: liguanyao 发布时间: 2009-11-10
看下一章,就有了。
作者: sclzmbie 发布时间: 2009-11-13
作者: md5xwl 发布时间: 2009-11-17
qmake-qt4 &&
make
看看
作者: tusooa 发布时间: 2010-01-28
作者: black_cx 发布时间: 2010-09-05
完全按书上写的代码
wangjun@wj-dt:~/qt/qt-book-test/chap02/gotocell2$ ls
gotocell2.pro gotocelldialog.h main.cpp
gotocelldialog.cpp gotocelldialog.ui
qmake -project
qmake-qt4 gotocell2.pro
然后make
/usr/bin/uic-qt4 gotocelldialog.ui -o ui_gotocelldialog.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o main.o main.cpp
g++ -Wl,-O1 -o gotocell2 main.o -L/usr/lib -lQtGui -lQtCore -lpthread
main.o: In function `main':
main.cpp:(.text+0x51): undefined reference to `GoToCellDialog::GoToCellDialog(QWidget*)'
collect2: ld returned 1 exit status
make: *** [gotocell2] 错误 1
开始以为自己那里抄写错误,就在网上下了源代码后直接编译,也是提示这个错误
我就接着编译其他例子,也会提示这种错误
这种情况就应该是为自己Qt的问题了
求助!!!
附件: |
文件注释: qt源码,各位可以帮为看看除了什么问题 gotocell2.tar.gz [1.19 KiB] 被下载 6 次 |
作者: wangjun403 发布时间: 2009-11-09
lee@lee-laptop:~/c$ make
/usr/bin/qmake-qt4 -unix -o Makefile c.pro
gcc -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o micro.o micro.c
micro.c: In function ‘main’:
micro.c:16: error: expected expression before ‘[’ token
micro.c:20: error: subscripted value is neither array nor pointer
micro.c:23: error: expected declaration or statement at end of input
micro.c:23: error: expected declaration or statement at end of input
make: *** [micro.o] 错误 1
好心人帮忙~
作者: liguanyao 发布时间: 2009-11-10
看下一章,就有了。
作者: sclzmbie 发布时间: 2009-11-13
作者: md5xwl 发布时间: 2009-11-17
qmake-qt4 &&
make
看看
作者: tusooa 发布时间: 2010-01-28
作者: black_cx 发布时间: 2010-09-05