I just updated to Xcode 8, and I can no longer build xml2-based applications. If I build a simple file and try to build it as follows:
c++ myapp.cc `xml2-config --cflags` `xml2-config --libs`
...I get the following error message:
ld: file not found: /usr/lib/system/libsystem_symptoms.dylib for architecture x86_64
It doesn't matter what's in myapp.cc (mine is just a main routine that returns 0). The root problem seems to be that Apple removed /usr/lib/system/libsystem_symptoms.dylib in Xcode 8, but many of the .tbd files in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib still point to it. Has anyone else run into a problem like this?
Let Xcode copy .dylib file into product after compiled. Add “New Copy Files Phase”, name it “Copy Libraries” Set the “Destination” to “Frameworks”. Add your dylib here.link_dynamic_lib
Comments#library#OS X#Xcode Dynamic library (with .dylib suffix at UNIX-like OS) is a kind of library discriminated from static library (with .a suffix). Static library will be linked at linking stage instantly after codes are compiled, before binary product output.
There are two method to add 3rd-part dynamic library to a Xcode target: Install the library into your system Copy your library into your product. Method 1: Install the library For most library, 3rd part library can be installed into system, at 1 /usr/local/lib or /usr/lib Then just add header path to 1
Unfortunately the path is not provided by developer of the App but the 3rd part library developer. So you can not let Xcode use the path relative your product or use path provided by yourself.
@mnencia answer works removing references to libsystem_symptomps.dylib, but failed for me using OS X. Change the following should allow it to work on OS X:
sudo /usr/bin/sed -i.backup -E -e 's@/usr/lib/system/libsystem_symptoms.dylib(, )?@@' \
$(grep -ril /usr/lib/system/libsystem_symptoms.dylib \
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib)
Hope this helps Mac developers.
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