• 4689阅读
  • 2回复

【提问】qt3.3.4的例子出错 [复制链接]

上一主题 下一主题
离线iamone
 

只看楼主 倒序阅读 楼主  发表于: 2005-12-05
程序代码:

#include <qapplication.h>
#include <qpushbutton.h>


int main( int argc, char **argv )
{
  QApplication a( argc, argv );

  QPushButton hello( "Hello world!", 0 );
  hello.resize( 100, 30 );

  a.setMainWidget( &hello );
  hello.show();
  return a.exec();
}

命令:
qmake -project
qmake
make
错误信息:
g++ -o qt h1.o -L/usr/X11R6/lib -lXext -lX11 -lm
h1.o(.text+OX30): In function 'main':
: undefined reference to 'QApplication::QApplication[in-charge](int&, char **)'
.......(以下是类似错误)......
collect2: ld returned 1 exit status
make: *** [qt] 错误 1

系统是gentoo linux2005.1 内核版本 2.6.12
qt版本3.3.4

请教这个错误如何处理一下呢?
[ 此贴被XChinux在2005-12-05 21:11重新编辑 ]
离线hao_rui_jun
只看该作者 1楼 发表于: 2008-04-27
大哥你好!你安装qt-3.3.4的过程还在吗?给我发一份吧
离线hao_rui_jun
只看该作者 2楼 发表于: 2008-04-27
邮箱:hao_rui_jun@sina.com。谢谢!
快速回复
限100 字节
 
上一个 下一个