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?
gcc SimpleXlibApp.c -o SimpleXlibApp -lX11 -L/usr/X11/lib -I/usr/X11/include
That line compiles the example here: http://en.wikipedia.org/wiki/Xlib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With