It is a good idea to use c++ static library in a iPhone project, for xcode always need rebuild all files once a while ( Even if I modify only cpp file, I don't know why :( ).The way is simple but there are some points to notice.
1) You should build both simulator and os version. Commonly, you will have four libraries:Debug-iphoneos,Debug-iphonesimulator,Release-iphoneos,and Release-iphonesimulator.
2) How to build static library? Just add a new target with the type static library, and add all relative code files into the target, set the build options and build.
3) A word about device version. You should use code sign when build device version.
4) A word about SDK version. Initially, I use a beta version of iphone sdk, and it can not build device version of libaray but can build app. After I update to the final sdk, everything is OK.
5) How to link with library? Add the library file - with extension ".a"- to frameworks, set the library search path to the library, and use #pragma comment( lib, "xxx.a" ) in your code. You should make separate build config for device and simulator version, for they use different library. so I have four configuration: debug, release, debug_iphone, release_iphone. And there is still a problem for me: the library added to framework is the same to all configurations, I add the debug library to framework, and I cann't change it to release version in release config. I use different library search path to solve this problem, it seems OK. For release config, it will use release version library although the library added to framework is debug version.
分享到:
相关推荐
Publisher : Addison Wesley... A technique for building debugging support into your software without a ton of overhead Thirteen specific techniques to improve the overall performance of your software
By highlighting the features and comparative elements of each language, and building on the reader's existing knowledge of object-oriented programming, C++ for Java Programmers enables users to ...
This directory contains CyAPI C++ Static Library source code. ReadMe.txt :Refer ReadMe.txt file for more information on CyUSB library. 2.CyUSB => library => csharp :This directory contains CyUSB C# ...
C++Building制作闹钟!!!!
Intel TBB(Threading Building Blocks) 项目负责人编写
Applied C++: Practical Techniques for Building Better Software, 英文版。C++ In-Depth系列之一,C++程序员必看。
Programming in C++ for Engineering and Science By 作者: Larry Nyhoff ISBN-10 书号: 1439825343 ISBN-13 书号: 9781439825341 Edition 版本: 1 Release Finelybook 出版日期: 2012-08-03 pages 页数: (744 ) $...
the hole name:Building iPhone OS Accessories: Use the iPhone Accessories API to Control and Monitor Devices This book provides a serious, in-depth look at Apple’s External Accessory Framework and ...
Applied C++: Practical Techniques for Building Better Software, 英文版。C++ In-Depth系列之一,C++程序员必看。
Building Virtual Pentesting Labs for Advanced Penetration Testing will teach you how to build your own labs and give you a proven process to test these labs; a process that is currently used in ...
关于C++的资料,很多人下的资料都是讲的是基础,这本书讲的是应用
Building a website for dummies
The PHP-CPP library is a C++ library for developing PHP extensions. It offers a collection of well documented and easy-to-use classes that can be used and extended to build native extensions for ...
Learning C++ by Building Games with Unreal Engine 4: A beginner’s guide to learning 3D game development with C++ and UE4, 2nd Edition by Sharan Volin--July 1, 2019 English | 2018 | ISBN: 1788476249 |...
The central chapters of the book introduce, explain, and demonstrate the elements of the theory that are most important for building simulation tools. They are bracketed by applications to robotics, ...
Building Software for Simulation.
This must-have book serves as a hands-on guide to developing iPhone and iPod touch Web applications.The must-have reference for building and optimizing Web applications for Safari on iPhone 3.0. ...
Building Virtual Pentesting Labs for Advanced Penetration Testing(2nd) 英文azw3 第2版 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
SQL Parser for C++. Building C++ object structure from SQL statements.
This book is a practical, code-intensive guide to designing and building C++ applications, fully updated for the C++14 release. The lessons emphasize good programming style, and how to think in C++ to...