I am trying to compile an app that uses multiple libraries using Xcode. To do so, I created a script that copies all of my .dylibs
from a location on my computer to the Frameworks
folder inside my app bundle.
After adding the necessary linker flags
and header search paths
, I must now add my library search paths
.
Since I have copied all the libraries inside my Frameworks folder of my app bundle, I have deduced that I must add $(FRAMEWORKS_FOLDER_PATH)
to the library search paths
setting. Adding this fails, because the linker can not find that directory.
I am guessing that the Frameworks
folder isn't created until after searching the library search paths
setting. If so, how am I supposed to use the libraries that I have copied inside my app bundle?
Placing the .dylib
files in the Frameworks
folder is something you do so that the application can find them when it runs.. dylib
files are dynamically linked, so the application loads them at run time.
Setting Xcode up to link to the .dylibs at compile time should just be a matter of dragging the .dylib
from the Finder into your Xcode project. I've shown this with a simple example project that uses libxar.dylib in the attached screenshot.
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