From: Lyle Johnson Date: 2001-05-02T23:41:23+09:00 Subject: [ruby-talk:14543] Re: Pukes while compiling... > I've RTFMed and I get the following error while compiling: > > gcc -g -O2 -rdynamic main.o ext/extinit.o ext/curses/curses.a > ext/etc/etc.a ext/fcntl/fcntl.a ext/md5/md5.a ext/pty/pty.a > ext/sdbm/sdbm.a ext/socket/socket.a ext/tcltklib/tcltklib.a > ext/tk/tkutil.a libruby.a -ldl -lcrypt -lm libruby.a -lncurses -lc > -lgdbm -lc libruby.a -lc libruby.a -lc libruby.a -lc libruby.a -lc > libruby.a -lc libruby.a -lc libruby.a -ltk -ltcl -lX11 -lm -ldl -lc > libruby.a -lc -o ruby > /usr/bin/ld: cannot find -lX11 > collect2: ld returned 1 exit status > make[1]: *** [ruby] Error 1 > > I'm really excited about using Ruby... therefore any help and/or > suggestions will be much appreciated... :) Mike, I don't know which operating system you're building on, so you may need to tweak this a little bit, but basically you need to add a flag to this link line to tell "gcc" where to find the X11 library (libX11.so). On most Linux systems, this library is found in /usr/X11R6/lib, so you'd add "-L/usr/X11R6/lib", e.g. gcc -g -O2 -rdynamic ... -L/usr/X11R6/lib -lX11 ... -o ruby If you're not building on Linux, libX11.so may live somewhere else. ISTR that on Solaris it was under /usr/openwin/lib; so if in doubt, you might do a system-wide find: find /usr -name "libX11*" -print Hope this helps, Lyle