Reputation: 1077
In short, in the iOS project I set /usr/local/include/
to Header Search Paths, then in source code I cannot include the headers in this directory. But in the Mac OS X projects anything is fine. How can I modify my setting of iOS project correctly?
In the long detail, I created a new iOS Cocoa Touch Framework project. Since I wanna include some headers of boost which was installed by Homebrew, I set the Header Search Paths in build TARGETS (not PROJECTS) as /usr/local/include/
. The code #include <boost/noncopyable.hpp>
cannot be compiled and the message is "boost/noncopyable.hpp file not found." But in Mac OS X projects, it can be compiled with the same code and the same settings.
Upvotes: 0
Views: 998
Reputation: 162
Select the Build Settings tab, then search for public header. Double click on the Public Headers Folder Path setting and enter the following in the popup:
include/$(PROJECT_NAME)
Upvotes: 0
Reputation: 162
Select the Build Settings tab, then search for public header. Double click on the Public Headers Folder Path setting and enter the following in the popup:
Upvotes: 0
Reputation: 1077
I found out the cause of this problem, that is, the iOS projects don't figure out the alias directory(and file?).
The boost libraries through Homebrew were installed in
/usr/local/Cellar/boost/1.57.0/include/
(dependent)
, and Homebrew create some alias directories and files in
/usr/local/include/
To include heads of boost in iOS projects, we must set the Header Search Paths as real path, and not alias path.
However until now, i cannot figure out why behaviors are different between iOS projects and Mac OS X projects. The current version of XCode is 6.4 (6E35b).
Upvotes: 1