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
STL之父,Alexander Stepanov对此评价不错,他说“Threading Building Blocks… could become a basis for the concurrency dimension of the C++ standard library”。其他 TBB 的早期用户,包括Autodesk,Sun,Red...
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# ...
《Applied C++: Practical Techniques for Building Better Software》是C++ In-Depth系列中的一本,专为提升C++程序员的技能而设计。本书的核心目标是帮助开发者构建更高效、更可靠、更易于维护的软件。以下是一些...
关于如何使用Intel C++ Compiler与不同版本的Visual Studio结合的具体细节,请参考编译器文档中的“Building Applications”部分。 ### 结语 Intel C++ Compiler 9.1 for Windows是一款功能强大的编译工具,它不仅...
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 ) $...
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++来构建一个简单的闹钟程序。这个程序对于那些容易沉迷于网络而忘记日常约会的用户来说非常有用。我们将深入分析程序的组成部分、各个组件的功能以及它们如何协同工作来实现闹钟功能...
**Microsoft Visual C++ 14.0 知识点详解** 在Python开发环境中,经常会遇到一个常见的问题,即在尝试安装某些Python库时,系统会提示“Microsoft Visual C++ 14.0 is required”。这是因为Python的部分扩展模块是...
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 ...
本书《Applied C++: Practical Techniques for Building Better Software》是C++ In-Depth系列书籍之一,专注于实践技巧,旨在帮助C++程序员构建更优质的软件产品。本书不仅涉及到理论知识,更着重于应用层面,通过...
《C++编程语言》课程是为已经熟悉C语言的程序员设计的,旨在引导他们进入C++的世界。课程基于最新的C++11标准,确保学员掌握的语法和技术是最前沿的。在为期四天(2014年6月2日至4日和10日至12日)的培训中,由...
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 |...
Building Virtual Pentesting Labs for Advanced Penetration Testing(2nd) 英文azw3 第2版 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
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...
* Use the XCode IDE to manage your source code, images, sounds, database files, and other application resources, building your app and deploying it onto your own device for testing. * Develop your ...