I am using GCC, what switches do I need to add to link with Xlib? After searching, all I could find was -lX11, but that gave me ld: library not found for -lX1
-lX11
ld: library not found for -lX1
Ubuntu 12.10 (And probably others) require sudo apt-get install libx11-dev.
sudo apt-get install libx11-dev