1,QApplication 头文件不存在

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

qt4是基于offline 包安装的,而OS系统默认已经安装qt3

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

/usr/bin/ld: cannot find -lGL

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

yum -y install libGL libGL-devel;

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

开发环境首先要做的是gnome,vncserver,(for Centos6.5);

Qt 环境变量配置

#QT PATH  
QTDIR=/opt/Qt5.4.1
PATH=$QTDIR/5.4/gcc_64/bin:$PATH:$HOME/bin:$QTDIR/Tools/QtCreator/bin
MANPATH=$QTDIR/doc/man:$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

export PATH QTDIR MANPATH LD_LIBRARY_PATH  
unset USERNAME

Qt调试

Qt: XKEYBOARD extension not present on the X server.
process 13438: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
  D-Bus not built with -rdynamic so unable to print a backtrace
AbortedCentos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

Centos设置gcc /g++ include

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

Centos6.5 Qt4开发 Cannot find -lGL QApplication not file or dir-LMLPHP

05-11 11:23