Cerniuk
Cerniuk

Reputation: 15208

How to properly add System Header Search Paths in Xcode

I'm having a problem getting the 'System Header Search Paths' in build settings to work in Xcode and allow me to use #import <Core/CoreBlocks.h> rather than a local copy and #import "CoreBlocks.h"

First I need to "frame" the problem.

I have built a framework that I use across many if not all my projects. This is Core.framework . Inside the framework is the requisite "Headers" directory and within that 40 other headers, all of which are included in the 41'st header Core.h

I drop the Core.framework into another project and the other project headers or source files then import:

#import <Core/Core.h>

and get all the functionality of the 40 modules in the framework. Works fine.

BUT, what I need is a simple way to run the 40 modules of Core.framework outside the framework construct, as a separate build or project, with just the source and breakpoints, so I can debug and enhance it.

I try to define the framework's source directory as a search path for the other project:

enter image description here

yet the compiler complains about the inability to find the headers in the source code:

enter image description here

is all I get for all of the imports even though they all reside in the lower Core directory below that path:

~/Development/Projects/Core/Core/Core/NSRange+Core.h

And that's where I'm at a loss. What am I doing wrong?

Upvotes: 0

Views: 2029

Answers (1)

Cerniuk
Cerniuk

Reputation: 15208

Found out why... Xcode for some reason can't use the *nix home directory notation in a pathname.

In other words while:

~/Development/Projects/Core/Core

does not work, the expanded equivalent:

/Users/BC/Development/Projects/Core/Core

does work in the Xcode system header search paths, yet it is not obvious as to why...

Upvotes: 1

Related Questions