Tag Archives: Basic Xlib functionality test failed

Basic Xlib functionality test failed [How to Solve]

This complete error message is in the ./configure phase

Basic XLib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/zhu/Qt/qt-x11-opensource-src-4.5.2/mkspecs/linux-g++

 

As usual, I’ll do it the same way. Go to config.test/x11/xlib and run the make command to see the error message

 

g++ -Wl,-O1 -o xlib xlib.o -L/usr/X11R6/lib -lXext -lX11 -lm
/usr/bin/ld: cannot find -lXext

See, g++ can’t find libXext.so under /usr/X11R6/lib.

 

The reason for this is that you need to install the libX11 development package, which is called libX11-dev in ubuntu/debian.
According to past experience, the package name is libX11-dev in . /configure, you can install the following 3 packages and everything will be fine

sudo apt-get install libX11-dev libXext-dev libXtst-dev