Compiling triangle's showme with X11 on Snow Leopard

Alec Jacobson

June 16, 2010

weblog/

I was trying to install Triangle on the Snow leopard computer I just started using and ran into some trouble compiling with x11. When I ran the command:
cc -O -o showme showme.c -lX11
I got this error:
ld: library not found for -lX11
collect2: ld returned 1 exit status
After some digging in my /usr directory I found X11 had its own directory. So when I issued this command:
cc -O -I/usr/X11 -o showme showme.c -L/usr/X11/lib -lX11
Everything worked fine. triangle showme demo working in x11 Note: Seems like it is going to be annoying that -lX11 doesn't work, so maybe I will make a link at some point.