gcc -o simplesquares simplesquares.c -L/usr/lib -lX11On older distributions, it could be:
gcc -o simplesquares simplesquares.c -L/usr/X11R6/lib -lX11In general, the directory to use in -Ldirectory is the one containing libX11.so, and can be found by:
find /usr -name libX11.so
programs: simplesquares