`

How to add static library file

    博客分类:
  • ios
 
阅读更多

1、以xcode的静态库文件模板创建静态库文件;

2、注意类文件的命名方式,以免和工程下的类冲突;

3、把需要作为接口的头文件声明为public,在xcode的target membership设置里面;

4、在静态库文件的引用target里面设置静态库文件的安装目录为当前工程的编译目录下,使得当前工程目标能在此目录下找到静态库文件,当前工程编译目录引用为$(BUILT_PRODUCTS_DIR);

5、设置静态库的公共头文件目录路径,使之在当前工程编译后放置于以静态库命名的文件目录下,即使得第4步的能找得到静态库文件的接口;

6、如果静态库中存在Objective-C风格的类文件,需要在静态库的build-setting中的Other linker flags中加上-ObjC,如果存在Category,还应加上-all_load或-force_load。

分享到:
评论

相关推荐

    Learning Flask Framework(PACKT,2015)

    Furthermore, you will walk through template blocks, inheritance, file uploads, and static assets. You will learn to authenticate users, build log in/log out functionality, and add an administrative ...

    sqlite3在Visual studio 2012下的编译

    Under "Code Generation" for "Runtime Library" make sure to pick static linking. /MTd (release) or /MTd (debug) Make a .DEF file A .def file should be placed in the project directory. Get the def ...

    HEVC开源编码器x265

    The Makefile/solution builds a static encoder.lib library and a standalone x265 executable that aims to be similar to x264 in its command line interface. Running without arguments shows you the ...

    Java邮件开发Fundamentals of the JavaMail API

    javamail-1_2.zip file, and add the mail.jar file to your CLASSPATH. The 1.2 implementation comes with an SMTP, IMAP4, and POP3 provider besides the core classes. After installing JavaMail 1.2, ...

    android-viewflow

    if instead you have a static numbers of views you ought to look at Fragments and the ViewPager in the Compatibility Library instead. Usage In your layout android:id="@+id/viewflow" app:...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    How can we use a class Foo in a header file without access to its definition? We can declare data members of type Foo* or Foo&. We can declare (but not define) functions with arguments, and/or ...

    CSharp 3.0 With the .NET Framework 3.5 Unleashed(english)

    - **Commenting Code**: This topic discusses how to add comments to your code to make it more readable and maintainable. - **Identifiers and Keywords**: Identifiers are used to name variables, methods,...

    Practical C++ Programming C++编程实践

    Line Puzzle Binary I/O Buffering Problems Unbuffered I/O Designing File Formats C-Style I/O Routines C-Style Conversion Routines C-Style Binary I/O C- Versus C++- Style I/O Programming Exercises ...

    Packt.Mastering.Csharp.and.NET.Programming

    - **Extension Methods**: Enables developers to add methods to existing types without creating a new derived type or recompiling the original type. #### 3. Advanced Concepts of C# and .NET - **C# 4 ...

    一个跨平台的CString源码

    // the Standard C++ Library basic_string<> template and add to it the // the following conveniences: // - The full MFC CString set of functions (including implicit cast) // - writing to/reading ...

    Visual C++ 编程资源大全(英文源码 DLL)

    sascript.zip A simple stack-based language that you can easily add to your projects (52KB)<END><br>93,strtok_src.zip A customizable string tokenizer (23KB)<END><br>94,ismart_demo.zip A ...

    tomcat-7_API_帮助文档

    System.loadLibrary("path-to-library-file"); } in some class. However, the application must also ensure that the library is not loaded more than once. If the above code were placed in a class inside...

    FFmpeg_ver12430_build

    You can use the following command to make a mp4/mov/3gp file<encoded with H264+AAC> streaming feature which is compatible with the latest Adobe Flash Player eg: qt-faststart.exe input.mp4 output.mp4 ...

    Heilx AAC Decoder optimized for ARM

    Simply add a new block to the file real/assembly.h which implements the required inline assembly functions for your processor. Something like <br>... #elif defined NEW_PROCESSOR <br>/* ...

    BCGControlBarPro.v12.00

    Implemented ability to add Ribbon Galleries to the dialogs (see screenshot). The new class CBCGPRibbonGalleryCtrl may be used for this purpose. Please take a look at BCGPMSOffice2007Demo example ...

    php.ini-development

    Expressions in the INI file are limited to bitwise operators and parentheses: ; | bitwise OR ; ^ bitwise XOR ; & bitwise AND ; ~ bitwise NOT ; ! boolean NOT ; Boolean flags can be turned on using ...

    The Art of Assembly Language Programming

    Some Final Comments on the MOV Instructions <br>4.9 Laboratory Exercises 4.9.1 The UCR Standard Library for 80x86 Assembly Language Programmers 4.9.2 Editing Your Source Files 4.9.3 The ...

    C++经典书籍高频词汇_不怕看不懂英文著作

    `way`, `sort`, `data`, `write`, `converted`, `pointed`, `specified`, `both`, `some`, `produce`, `order`, `synopsis`, `different`, `add`, `here`, `information`, `format`, `design`, `element`, `space`,...

Global site tag (gtag.js) - Google Analytics