简体   繁体   中英

Xcode 4 Static library creation Confusion

I want to create static library through Xcode 4.I took one .a build using cocoa Touch static library.When I add .h file and .a file into new project ,it gives missing required architecture i386 in file error.I have to set any Header search path in xcode 4 like earlier versions.?

1)what is the best approach, can i develop static library which will work in simulator and device as well through xcode 4?

2)some tutorials are saying that we have to develop a)Create a build for the device (the armv6 and armv7 architecture). b)Create a build for the simulator (the i386 architecture). cant we develop single .a component for all architecture?

which one is the right in above?what is the right approach?any help please?

A nice way to solve this is to use the workspace feature and include the library's target in the main project. That way the library gets compiled more or less automatically with the correct settings and it's much easier to propagate changes in the library code. Of course, this is only an option unless you want to distribute the library without sources to other people.

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