The answer is libX11.so -- it contains the basic Xlib routines, and you can tell this is an Xlib routine because it starts with a plain "X". If it started with "Xt", then you'd know it's a method in the Xt widget set.
I don't believe that the name of this library has changed in 15+ years, so the compile command shown in the book should work for you. I believe that the library name is also listed in the manpage for the X routines (which of course means that you have to have manpages available, and not everyone does).
Other than that, grep may be your best bet, although grepping across /usr/lib is going to turn up both references to the function and the declaration, so that probably isn't useful. There's also a command-line utility (you are running on Linux, right?) that will show the contents of a .so, which may be useful as well.
Edit: ah, Irix, not Linux; didn't notice that on first read. I think the best approach is going to be finding the manpages.