一开始都是在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: *** [main.o] 错误 1