How to (almost) create your own iPhone OS framework
2010-04-19 16:13:00 来源:WEB开发网Step 2: Merge library files for different platforms into one.
There is a command line tool called 'lipo' that allows you to combine different .a files into one. It comes for free with the SDK. Using a custom build target, we can execute that command after everything got built by the compiler/linker. Now, create a new "Shell Script" build target, we'll call it 'Build ALL'. This will allow us to call the 'lipo' tool during build time. Drag the other static library build targets (not the actual .a files) into the new target - this will make sure that our lib files get built before we bundle them up. Expand 'Build ALL' and double-click on "Run Script". In the window that opens up, paste the following shell script:
# remove existing product lib file, just in caserm -rf build/${BUILD_STYLE}-iphoneos/libPseudoFramework-${BUILD_STYLE}.a# combine lib files for various platforms into onelipo -create "build/${BUILD_STYLE}-iphoneos/libPseudoFramework dev.a" "build/${BUILD_STYLE}-iphonesimulator/libPseudoFramework sim.a" -output build/${BUILD_STYLE}-iphoneos/libPseudoFramework-${BUILD_STYLE}.a
In the dropdown box on top, select 'Use project settings' for Active SDK and 'Debug' for Active Configuration. Now, when you right-click on 'Build ALL' target and select "Build", both 'sim' and 'dev' lib files should be built along with the combined 'libPseudoFramework-Debug.a' file, which you should be able to find under 'build/Debug-iphoneos' folder in your project directory. This is the debug version of the library, with debug symbols and all that stuff. If you change Active Configuration to Release and run 'Build ALL' again, a release version will show up as 'build/Release-iphoneos/libPseudoFramework-Release.a'. These are the library files that you can now use in other projects.
- ››TOscilloscope 仿Windows任务管理器CPU使用记录组...
- ››How to Make a Dark, Post-Apocalyptic City Illu...
- ››tomcat不支持TCP/IP6协议
- ››tomcat 下的 url 大小写问题
- ››tomcat6.0.28 内存溢出PermGen Space
- ››Tomcat 系统架构与设计模式,第 2 部分: 设计模式...
- ››Tomcat 系统架构与设计模式,第 1 部分: 工作原理...
- ››How to (almost) create your own iPhone OS fram...
- ››TOMCAT和IIS整合
- ››Tomcat性能调优方案
- ››Tomcat6 下 MySQL 5.1 数据源配制
- ››Tomcat启动分析server.xml
更多精彩
赞助商链接