简体   繁体   中英

Xcode Static Library Template… build doesn't contain headers?

So I'm using the Static Library template included in Xcode. Right now just trying to build a simple template to see how static libraries really work.

Anyways in my static library I have two classes: mylibrary (.h/.m) - This is simply an NSObject modalView (.h/.m) - This is a UIViewController

The problem though is when I build the static library. The project builds the mylibrary.a file... however there is no "Headers" folder in the output. This means that when I add the library to my other project it gives "undefined" errors because it can't find the .h file for myLibrary.

Any ideas on how to fix this? Thanks

您需要将.h文件与.a文件一起拖动到新项目中

I have a bunch of scripts here:

https://github.com/drekka/dUsefulStuff/tree/master/scripts

Which I use to build static libraries and frameworks. You might find them useful in helping to assemble your library. The main (controller) build script is here

https://github.com/drekka/dUsefulStuff/blob/master/build.sh

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM