objective c - How are Libraries named in xcode? How do I navigate to a specific library? -
i getting error says - "ld: - library not found -lpods-appname-dznwebviewcontroller" question not how fix error rather understand xcode looking library? there directory library needs be? below snapshots of project workspace. image of project files
using cocoapods maintain library dependencies
a library supports cocoapods provide command required install library. in case, is
pod 'dznwebviewcontroller'
if doesn't work, can edit project settings manually.
manually maintaining library dependencies
even when using cocoapods, can still edit locations yourself. can provide xcode 3 types of paths search files, using project settings in search paths section:
- framework search paths refers frameworks pre-compiled
- library search paths refer library include in project, access code. these pre-compiled files have '.a' extension.
- header search paths used in conjunction library search paths, tell xcode headers located given library.
the error xcode provides tell search path setting , path had problem with:
- ld: refers library search paths
- fd: refers framework search paths
- hd: refers header search paths
to provide fully-qualified search path, can can begin path using pre-set placeholders xcode provides convenience.
the following 2 placeholders refer same location , therefore synonymous, default:
- $(project_dir) - refers project root directory, source code located
- $(srcroot) - refers source root directory
to complete path specification, follow '/', providing full path directory, in:
$(srcroot)/some_dir/some_other_dir
to provide recursive search path, add 2 asterisks @ end of path, in:
$(srcroot)/some_dir/some_other_dir/**
to add multiple paths in 1 of searh paths settings, separate them spaces:
$(srcroot)/some_dir/some_other_dir $(srcroot)/some_dir2/some_other_dir3
this brings obvious question: what if path contains spaces?
if path contains spaces, wrap path in double quotes, in:
"$(srcroot)/some dir/some other dir/" "$(srcroot)/some dir2/some other dir3/"
another option escape spaces in paths, preceding each space backslash (in case, cannot use quotes). however, makes harder read, , therefore more difficult debug, when there multiple long paths:
$(srcroot)/some\ dir/some\ other\ dir/ $(srcroot)/some\ dir2/some\ other\ dir3/
Comments
Post a Comment