You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/raoyang/share/3rdparty/src/qt/qt-everywhere-opensource-src-4.8.1/mkspecs/linux-g++.
cd qt-everywhere-opensource-src-4.8.1/config.tests/x11/xlib/
make
g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++ -I. -I/usr/local/mysql/include -I/usr/X11R6/include -o xlib.o xlib.cpp
xlib.cpp:42:22: error: X11/Xlib.h: 没有那个文件或目录
xlib.cpp: In function ‘int main(int, char**)’:
xlib.cpp:46: error: ‘Display’ was not declared in this scope
xlib.cpp:46: error: ‘d’ was not declared in this scope
xlib.cpp:46: error: ‘NULL’ was not declared in this scope
xlib.cpp:46: error: ‘XOpenDisplay’ was not declared in this scope
xlib.cpp:47: error: ‘XCloseDisplay’ was not declared in this scope
make: *** [xlib.o] 错误 1
sudo apt-get install libX11-dev
make
g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++ -I. -I/usr/local/mysql/include -I/usr/X11R6/include -o xlib.o xlib.cpp
g++ -Wl,-O1 -o xlib xlib.o -L/usr/X11R6/lib -L/usr/local/mysql/lib -lXext -lX11 -lm
/usr/bin/ld: cannot find -lXext
collect2: ld returned 1 exit status
make: *** [xlib] 错误 1
sudo apt-get install libXext-dev
make
g++ -Wl,-O1 -o xlib xlib.o -L/usr/X11R6/lib -L/usr/local/mysql/lib -lXext -lX11 -lm