Skip to content
Nat! edited this page Apr 29, 2019 · 10 revisions

For Xcode integration it is recommended to use the "legacy workflow" with shared libraries, as it is simpler to setup and maintain.

Last checked in 2019 against Xcode 9.4.1

Install "Legacy workflow"

brew install mulle-kybernetik/software/Foundation

Add mulle-clang as a compiler to Xcode

/usr/local/bin/mulle-clang-add-to-xcode

This is currently (7.0.0) not installed properly. Grab it from here and run it manually.

Change Project "Build Settings"

This has to be done for every new project.

You may want to use a .xcconfig file to set this more easily. TODO: provide .xcconfig file here

Edit the settings of the "project" not the "target". But do check the target settings, that all changed project settings are properly inherited.

Choose mulle-clang compiler

Set GCC_VERSION/Compiler for C/C++/Objective-C to "MulleClang/de.codeon.compilers.mulle-clang.

Disable Apple runtime features

Turn off CLANG_ENABLE_OBJC_ARC. Just hit DELETE. The project should revert to the default "NO".

Turn off CLANG_ENABLE_OBJC_WEAK. Just hit DELETE. The project should revert to the default "NO".

Set CLANG_LINK_OBJC_RUNTIME to "NO".

Turn off CLANG_ENABLE_MODULES. Just hit DELETE. The project should revert to the default "NO".

Set COMPILER_INDEX_STORE_ENABLE/Enable Index-While-Building Functionality to "NO".

Set GCC_C_LANGUAGE_STANDARD to "c11".

Add Search Paths

Add /usr/local/includeto HEADER_SEARCH_PATHS/Header Search Paths. Add /usr/local/lib to LIBRARY_SEARCH_PATHS/Library Search Paths.

Change Target "Build Phases"

Add libFoundation.dylib

open /usr/local/lib and then drag libFoundation.dylib to your Libraries to link against.

That's it.