首页| 论坛| 消息

标题:make 的 时候出错
作者:weilong122
日期:2006-05-13 01:14
内容:

一开始都是在Windows下使用Qt的
今天在Linux下用了下
在编译一个QT自带的 例子的 时候
在make是出现下列错误
不知道是哪里没有设置好
请教是何原因?
=======================================================================================
main.cpp:24:24: error: QApplication: 没有那个文件或目录
In file included from main.cpp:29:
server.h:27:19: error: QDialog: 没有那个文件或目录
server.h:34: 错误:expected class-name before ‘{’ token
server.h:35: 错误:ISO C++ 不允许声明无类型的 ‘Q_OBJECT’
server.h:37: 错误:expected ‘;’ before ‘public’
server.h:40: 错误:expected `:' before ‘slots’
server.h:41: 错误:expected primary-expression before ‘void’
server.h:41: 错误:ISO C++ 不允许声明无类型的 ‘slots’
server.h:41: 错误:expected ‘;’ before ‘void’
server.h:47: 错误:‘QStringList’ 没有命名一个类型
main.cpp: In function ‘int main(int, char**)’:
main.cpp:33: 错误:‘QApplication’ was not declared in this scope
main.cpp:33: 错误:expected `;' before ‘app’
main.cpp:35: 错误:‘class Server’ 没有名为 ‘show’ 的成员
main.cpp:37: 错误:‘class Server’ 没有名为 ‘exec’ 的成员
main.cpp: At global scope:
main.cpp:31: 警告:未使用的形参 ‘argc’
main.cpp:31: 警告:未使用的形参 ‘argv’
make: *** 错误 1


#1 [vruser 05-14 00:02]
可能是因为QT的版本不同
#2 [XChinux 05-14 11:57]
你Linux下使用的Qt是什么版本??和Windows下的版本相同么?
#3 [weilong122 05-14 13:34]
Qt4.1.2
和Windows下一样的
是不是环境变量的问题呢(和自带的Qt发生了冲突)?
从来没在Linux中设置过环境变量,应该怎么设置呢,麻烦你说的详细点.谢谢了
我用的是Redhat9
#4 [XChinux 05-14 14:58]
看Qt Installing版置顶的安装Qt4 for X11帖
#5 [xugysjs 05-15 17:23]
或者是文件路径不对!

<< 1 2 >> (1/2)

回复 发表
主题 版块