Dylib link problem of MacOS installation through Homebrew.
When I installed [email protected] today, I found there is no soft link to libplist-VERSION.dylib in /usr/lib, which caused my C code using libplist as dylib's compile failed while compling flags set to -lplist/-lplist++.
Error code:
ld: library not found for -lplist++
clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [patcher] Error 1
Consider automatically create soft link to dylib after Homebrew installation.
Same issue on my end, but found that soft links located on /usr/local/lib
Same issue on my end, but found that soft links located on /usr/local/lib
@idears-org I checked it out in /usr/local/lib, the soft links are:
libplist++-2.0.3.dylib libplist++-2.0.a libplist++-2.0.dylib libplist-2.0.3.dylib libplist-2.0.a libplist-2.0.dylib, which means you have to specify the version while refering to this dylib. A better way to do this is to create a soft link libplist.dylib or libplist++.dylib to the latest version instead of just moving a copy to the lib folder.
Thanks for your information, I've use your workaround without change any thing under lib folder but just modify my makefile to use the version 2.0.3 -lplist++-2.0.3, It works.
But Yes, the better way is automatically soft link the latest version to libplist.dylib and libplist++.dylib in the installation progress. Hope the author can fix this.
The library is apparently actually called "libplist-2.0" not "libplist", just like glib2 is "libglib-2.0" and there is no "libglib.dylib". The supplied .pc publish the correct -l flags for you. Is homebrew (or whatever specific you are compiling) trying to hardcode flags directly rather than relying on that standard tool?