亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 3033 | 回復(fù): 5
打印 上一主題 下一主題

請教 Qt編譯出現(xiàn)的問題 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2006-11-15 13:11 |只看該作者 |倒序瀏覽
我用的是redhat9.0,自帶的qt-3.1,剛開始使用,想那個簡單程序先運(yùn)行一下,
當(dāng)我使用qtdesigner編輯好程序后,運(yùn)行出現(xiàn)錯誤,請各位指教。hehe.pro是工程的名字

[lili@localhost lili]$ qmake hehe.pro
[lili@localhost lili]$ make
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
main.cpp: In function `int main(int, char**)':
main.cpp:8: `QPushButtton' undeclared (first use this function)
main.cpp:8: (Each undeclared identifier is reported only once for each function
   it appears in.)
main.cpp:8: parse error before `(' token
main.cpp:9: `hellobtn' undeclared (first use this function)
make: *** [.obj/main.o] Error

下面是我的程序:
#include <qapplication.h>
#include <qpushbutton.h>

int main( int argc,char **argv)

{
QApplication a(argc,argv);

QPushButton hellobtn("hello world!",0);
hellobtn.resize(100,20);
a.setMainWidget(&hellobtn);
hellobtn.show();
return a.exec();
}

所設(shè)的環(huán)境變量如下:
QTDIR=usr/lib/qt-3.1
PATH=$QTDIR/binPATH
LD_LIBRARY_PATH=$QTDIR/binLD_LIBRARY_PATH

export  QTDIR  PATH  LD_LIBRARY_PATH

論壇徽章:
0
2 [報告]
發(fā)表于 2006-11-15 15:35 |只看該作者
main.cpp:8: `QPushButtton' undeclared (first use this function)

其中的 `QPushButtton'  多了一個 `t' ,改為 `QPushButton' 應(yīng)該就可以了。進(jìn)行編譯的程序并不是你上面給出的程序。

論壇徽章:
0
3 [報告]
發(fā)表于 2006-11-21 20:53 |只看該作者
謝謝您的回復(fù),但是要改的話是在什么地方改呢?
我是初學(xué)者,還請指教。 謝謝

論壇徽章:
0
4 [報告]
發(fā)表于 2006-11-22 00:20 |只看該作者
>> 但是要改的話是在什么地方改呢?

main.cpp:8: `QPushButtton' undeclared (first use this function)

這個錯誤出現(xiàn)在 main.cpp 文件中的第 8 行。

論壇徽章:
0
5 [報告]
發(fā)表于 2006-11-23 20:48 |只看該作者
您好,到現(xiàn)在我的問題還是沒有解決,從別的地方了解到,是要將QPushButtton 改成QPushButton,就可以,但是我不知在什么地方改,是否在安裝的文件里改呢,請版主指教! 謝謝。

論壇徽章:
0
6 [報告]
發(fā)表于 2006-11-23 21:21 |只看該作者
在 main.cpp 文件中改。
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP