新手 刚安装完QT 试着编译简单的HelloWorld文件,
按顺序
qmake -project
qmake hello.pro
make hello
但是make后出现如下错误:
g++ hello.cpp -o hello
hello.cpp:1:24: error: QApplication: No such file or directory
hello.cpp:2:18: error: QLabel: No such file or directory
hello.cpp: In function 'int main(int, char**)':
hello.cpp:6: error: 'QApplication' was not declared in this scope
hello.cpp:6: error: expected ';' before 'app'
hello.cpp:7: error: 'QLabel' was not declared in this scope
hello.cpp:7: error: expected ';' before 'label'
hello.cpp:8: error: 'label' was not declared in this scope
hello.cpp:9: error: 'app' was not declared in this scope
make: *** [hello] Error 1
是不是我的环境变量没有设对呢?为什么找不到库?
求教~~磕头~~
路径path:C:\Qt\2010.02.1\mingw\bin;C:\Qt\2010.02.1\qt\bin
不知道哪里错了
[ 此帖被woshixjz在2010-03-02 10:51重新编辑 ]