Implementing Static Libraries on iPhone

I created a static library after this link .

But I am facing problems in using the library. For help on how to use static libraries in an iPhone project, I followed this link .

But I'm always struggling with "How to implement static libraries in any other iPhone project?" question.

Thanks to everyone.

+3
source share
1 answer

You can use a cross-project link, as in posts, but this has a few recessions.

, Xcode ( iPhone), .

~/Library/MyLibraries/, .a . , :

~/Library/MyLibraries/
                     /MyLib-1.0.0/Headers/header1.h
                                         /header2.h
                                 /libmylib.a
                                 /libmylib_debug.a
                     /MyOtherLib-2.1.0/Headers/...
                                      /libmyotherlib.a

Xcode :

LIBRARIES_DIR      $(USER_LIBRARY_DIR)/MyLibraries
MYLIBRARY_LIBROOT  $(LIBRARIES_DIR)/MyLib-1.0.0

HEADER_SEARCH_PATHS $(MYLIBRARY_LIBROOT)/Headers
OTHER_LDFLAGS       $(MYLIBRARY_LIBROOT)/libmylib.a

MYLIBRARY_LIBROOT, . .

, HEADER_SEARCH_PATHS OTHER_LDFLAGS.

+5

Source: https://habr.com/ru/post/1712545/


All Articles