• 3454阅读
  • 1回复

编译时的一个错误,帮忙看看 [复制链接]

上一主题 下一主题
离线心勿心
 
只看楼主 倒序阅读 楼主  发表于: 2009-04-17
main.cpp:42:25: QApplication: No such file or directory
In file included from main.cpp:44:
mainwindow.h:45:24: QMainWindow: No such file or directory
In file included from main.cpp:44:
mainwindow.h:52: parse error before `{' token
mainwindow.h:69: parse error before `private'
mainwindow.h:77: parse error before `&' token
mainwindow.h:78: parse error before `&' token
mainwindow.h:79: parse error before `&' token
mainwindow.h:80: parse error before `&' token
mainwindow.h:83: 'QString' is used as a type, but is not defined as a type.
mainwindow.h:88: syntax error before `*' token
mainwindow.h:89: syntax error before `*' token
mainwindow.h:100: parse error before `}' token
mainwindow.h:102:8: warning: no newline at end of file
main.cpp: In function `int main(int, char**)':
main.cpp:48: `application' undeclared (first use this function)
main.cpp:48: (Each undeclared identifier is reported only once for each
   function it appears in.)
main.cpp:48: `Q_INIT_RESOURCE' undeclared (first use this function)
main.cpp:50: `QApplication' undeclared (first use this function)
main.cpp:50: parse error before `(' token
main.cpp:51: aggregate `MainWindow mainWin' has incomplete type and cannot be
   defined
main.cpp:53: `app' undeclared (first use this function)
main.cpp:47: warning: unused parameter `int argc'
main.cpp:47: warning: unused parameter `char**argv'
main.cpp:54:3: warning: no newline at end of file
make: *** [main.o] Error 1
离线zougw
只看该作者 1楼 发表于: 2009-04-18
你的环境变量设置的不对,编译器找不到头文件
快速回复
限100 字节
 
上一个 下一个