环境变量都设置正确的啊(如下所示)。怎么就编译出错了呢。。。。
[root@localhost ~]# export | grep qt
declare -x PATH="/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/work/program/jdk1.6.0_12/bin:/work/program/dsk/qt-everywhere-opensource-src-4.6.1/bin:/work/program/dsk/qt-everywhere-opensource-src-4.6.1/bin"
declare -x QMAKESPEC="/work/program/dsk/qt-everywhere-opensource-src-4.6.1/mkspecs/linux-g++"
declare -x QTDIR="/work/program/dsk/qt-everywhere-opensource-src-4.6.1"
declare -x QTINC="/work/program/dsk/qt-everywhere-opensource-src-4.6.1/include"
declare -x QTLIB="/work/program/dsk/qt-everywhere-opensource-src-4.6.1/lib"
错误信息如下所示:
[root@localhost qt]# make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/work/program/dsk/qt-everywhere-opensource-src-4.6.1/mkspecs/linux-g++ -I. -I/work/program/qtdevelop/include/QtCore -I/work/program/qtdevelop/include/QtGui -I/work/program/qtdevelop/include -I. -I. -o hello.o hello.cpp
hello.cpp:1:24: 错误:QApplication:没有那个文件或目录
hello.cpp:2:18: 错误:QLabel:没有那个文件或目录
hello.cpp: In function ‘int main(int, char**)’:
hello.cpp:6: 错误:‘QApplication’ 在此作用域中尚未声明
hello.cpp:6: 错误:expected `;' before ‘app’
hello.cpp:7: 错误:‘QLabel’ 在此作用域中尚未声明
hello.cpp:7: 错误:‘label’ 在此作用域中尚未声明
hello.cpp:7: 错误:expected type-specifier before ‘QLabel’
hello.cpp:7: 错误:expected `;' before ‘QLabel’
hello.cpp:9: 错误:‘app’ 在此作用域中尚未声明
hello.cpp: At global scope:
hello.cpp:4: 警告:未使用的参数 ‘argc’
hello.cpp:4: 警告:未使用的参数 ‘argv’
make: *** [hello.o] 错误 1