tags:

views:

20

answers:

1

I have a pretty basic X11 app that I run on Linux that I'm trying to get compiled under OSX 10.5.8. I have X11 and the X11 SDK installed, and modified the makefile as follows:

CFLAGS = -L/usr/X11/lib -I/usr/X11/include

Everything compiles fine, but the linker can't find the X11 lib.

ld: library not found for -lX11

I've looked on google, but the only other people I've found with this problem so far either didn't have the X11 SDK installed or didn't know about the -L flag.

Any ideas?

A: 

You may be looking in the wrong location for the library; it's certainly in a different location on my OS X box. Try typing:

locate libX11.dylib

and adding an appropriate path. E.g. on my system you'd need -L/usr/X11/lib/ in you CFLAGS.

borrible