我按照网站上的安装QT4。1。0的帖子,把QT安装成功后。
编译一个例子程序,却出现了找不到该函数的错误。
环境变量信息:
PATH=/usr/local/Trolltech/Qt-4.1.0/bin:$PATH
export PATH
QTDIR=/usr/local/Trolltech/Qt-4.1.0
export QTDIR
下面是编译时的窗口信息:
[root@sidneychen root]# qmake -o Makefile /root/qt-x11-opensource-src-4.1.0/qmak
e/examples/tutorial/hello.pro
[root@sidneychen root]# make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_SHARED -I/usr/local/Trolltech/Qt-4.1.0/mkspecs/linux-g++ -Iqt-x11-opensourc
e-src-4.1.0/qmake/examples/tutorial -I/usr/local/Trolltech/Qt-4.1.0/include/QtCo
re -I/usr/local/Trolltech/Qt-4.1.0/include/QtGui -I/usr/local/Trolltech/Qt-4.1.0
/include -Iqt-x11-opensource-src-4.1.0/qmake/examples/tutorial -Iqt-x11-opensour
ce-src-4.1.0/qmake/examples/tutorial -I. -o hello.o qt-x11-opensource-src-4.1.0/
qmake/examples/tutorial/hello.cpp
qt-x11-opensource-src-4.1.0/qmake/examples/tutorial/hello.cpp: In constructor
`MyPushButton::MyPushButton(const QString&)':
qt-x11-opensource-src-4.1.0/qmake/examples/tutorial/hello.cpp:5: no matching
function for call to `QPushButton::QPushButton(const QString&, int, const
char[13])'
/usr/local/Trolltech/Qt-4.1.0/include/QtGui/qpushbutton.h:87: candidates are:
QPushButton::QPushButton(const QPushButton&)
/usr/local/Trolltech/Qt-4.1.0/include/QtGui/qpushbutton.h:45:
QPushButton::QPushButton(const QIcon&, const QString&, QWidget* = 0)
/usr/local/Trolltech/Qt-4.1.0/include/QtGui/qpushbutton.h:44:
QPushButton::QPushButton(const QString&, QWidget* = 0)
/usr/local/Trolltech/Qt-4.1.0/include/QtGui/qpushbutton.h:43:
QPushButton::QPushButton(QWidget* = 0)
make: *** [hello.o] Error 1
请教高手啊,请问是什么原因???

[ 此贴被XChinux在2006-03-21 12:58重新编辑 ]