How to add .a C static library to Xcode and use it

2019-05-17 16:35发布

问题:

This question already has an answer here:

  • How to “add existing frameworks” in Xcode 4? 9 answers

I have a static C library compiled with arm7-gcc and i want to use it in my iOS project. i added it to project but i can't figure out how to use it.

回答1:

After adding the library to the project and including the header in your application codeб there is a second step. That step is letting the Xcode project know where the header file/files is/are. You do this by editing the "User Header Search Paths" build setting with the path to the header files.