ld: library not found for -IX11 ? [SOLVED] lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- dieselnutjob · 2014-08-16 12:04 Can anyone tell me how to fix "ld: library not found for -IX11" when compiling an X11 app for Mac OSX please? thanks ---------------------------------------------------------------------- kamischi · 2014-08-16 13:01 probably, libX11.dylib is search for in /usr/lib or /usr/X11/lib, but it might be in /opt/X11/lib. Adding "-Fl/opt/X11/lib" as an option for fpc might resolve it. But check, whether X11 is installed on your system. MiSchi ---------------------------------------------------------------------- dieselnutjob · 2014-08-16 13:23 thank you your solution worked. To flesh it out a bit:- In Lazarus go to Project Project Options on the left select Compiler Options then sub item Paths in Libraries add /usr/X11/lib/ ---------------------------------------------------------------------- kamischi · 2014-08-16 16:18 Did you install lazarus from disk images or from fink? ---------------------------------------------------------------------- dieselnutjob · 2014-08-16 16:45 from here http://sourceforge.net/projects/lazarus/files/Lazarus%20Mac%20OS%20X%2 0i386/Lazarus%201.2.4/ ---------------------------------------------------------------------- kamischi · 2014-08-16 20:55 ok. So, this is probably another point favoring installing through fink. I have put that into the fpc.cfg file since quite some time and it should work out of the box. Good to know, in case i get questioned once again, what the fink packages are good for. MiSchi ---------------------------------------------------------------------- Graeme · 2014-08-16 23:33 Quote from: dieselnutjob on August 16, 2014, 02:04:55 pmCan anyone tell me how to fix "ld: library not found for -IX11" when compiling an X11 app for Mac OSX please? If it was a fpGUI based application that you tried to compile (I think you sent me a personal message about this), add -Fl/usr/X11/lib to your fpc.cfg file - it will then be fixed for all future projects too. The /docs/INSTALL.TXT explains how to compile and run such apps under OSX.