That error message is fairly straightforward: your app depends on libX11.
You need to build libX11

. Which may or may not depend on a full XOrg install, can't recall, and not on a Linux box to check right now.
Once it's installed, it should be in a standard path (provided you configured it with the right --prefix), and you won't have to tinker (more than usual) with CPPFLAGS/LDFLAGS.
Did I mention that building GUI stuff risked getting hairy fairly rapidly? ^^.