background preloader

Xcode linking

Facebook Twitter

Using Open Source Static Libraries in Xcode 4. Xcode 4.0.1 allows us to more easily create and use third party libraries in iOS projects.

Using Open Source Static Libraries in Xcode 4

I think the process is still more complicated than it needs to be. Xcode’s documentation suggests that it should automatically detect implicit dependencies and index classes across workspaces but I have not found this to be the case. Here I’ll cover the steps I have found for creating and sharing code between projects and with other developers. Background Workspaces: Xcode 4 introduced the concept of workspaces as containers for multiple projects. By default, all the Xcode projects in a workspace are built in the same directory, referred to as the workspace build directory.Xcode examines the files in the build directory to discover implicit dependencies.Each project in a workspace continues to have its own independent identity. Schemes: Technical Q&A QA1490: Technical Q&A QA1490.

Technical Q&A QA1490 A: Why do I get a runtime exception of "selector not recognized" when linking against an Objective-C static library that contains categories?

Technical Q&A QA1490: Technical Q&A QA1490

The "selector not recognized" runtime exception occurs due to an issue between the implementation of standard UNIX static libraries, the linker and the dynamic nature of Objective-C. Objective-C does not define linker symbols for each function (or method, in Objective-C) - instead, linker symbols are only generated for each class.

If you extend a pre-existing class with categories, the linker does not know to associate the object code of the core class implementation and the category implementation. This prevents objects created in the resulting application from responding to a selector that is defined in the category. To resolve this issue, the target linking against the static library must pass the -ObjC option to the linker. In Xcode, double-click the target's name under "Targets" in the Project window. Issue 627 - zxing - put "-all_load" & "-ObjC" in other linker flags, can not build - Multi-format 1D/2D barcode image processing library with clients for Android, Java.

Compiler Options in Xcode - GCC or LLVM? - Blog. Chances are if you are using Xcode 3 and you haven’t played with the build settings for a project that you are still using the GNU Compiler Collection, GCC.

Compiler Options in Xcode - GCC or LLVM? - Blog

Apple is slowly phasing out support for GCC and moving to new compiler technologies based on the Low Level Virtual Machine (LLVM) open source project. The LLVM based tools are available (with some differences) to both Xcode 3 and 4 so you do not have to wait until you migrate to Xcode 4 to start taking advantage of it. The LLVM Project The LLVM project is an open source collection of tools (see LLVM.org for the full list) that build on a core set of libraries that provide an optimizer and code generator.

Other tools in the LLVM project include the Clang frontend parser and the LLDB debugger. As of writing GCC remains the default compiler for Xcode 3 but with the release of Xcode 4 the default compiler for new projects has changed to LLVM-GCC.