• 3684阅读
  • 2回复

求教 编译问题 [复制链接]

上一主题 下一主题
离线xushiq
 

只看楼主 倒序阅读 楼主  发表于: 2010-04-14


我在MAKE后出现了下列错误,请高手指点是不是G++的问题阿

g++ -c -pipe -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/include/qt3 -o hello.o hello.cpp
hello.cpp:1:23: 错误: QApplication:没有该文件或目录
hello.cpp:2:22: 错误: QPushButton:没有该文件或目录
hello.cpp: In function ‘int main(int, char**)’:
hello.cpp:6: 错误: ‘QApplication’在此作用域中尚未声明
hello.cpp:6: 错误: expected `;' before ‘app’
hello.cpp:7: 错误: ‘QPushButton’在此作用域中尚未声明
hello.cpp:7: 错误: expected `;' before ‘b’
hello.cpp:9: 错误: ‘b’在此作用域中尚未声明
hello.cpp:10: 错误: ‘QObject’未声明
hello.cpp:10: 错误: ‘clicked’在此作用域中尚未声明
hello.cpp:10: 错误: ‘SIGNAL’在此作用域中尚未声明
hello.cpp:10: 错误: ‘app’在此作用域中尚未声明
hello.cpp:10: 错误: ‘quit’在此作用域中尚未声明
hello.cpp:10: 错误: ‘SLOT’在此作用域中尚未声明
hello.cpp: At global scope:
hello.cpp:4: 警告: 未使用的参数‘argc’
hello.cpp:4: 警告: 未使用的参数‘argv’
make: *** [hello.o] 错误 1
离线steinlee

只看该作者 1楼 发表于: 2010-04-14
Qt library is not set and headers are not included. Qt3 is too old and do not use it. Try to use the latest Qt4.
Looking for remote C/C++ and Qt 兼职
离线xushiq

只看该作者 2楼 发表于: 2010-04-17
问题已经解决谢谢
快速回复
限100 字节
 
上一个 下一个