开发者

Import a header from a referenced (blue) folder in Xcode

开发者 https://www.devze.com 2023-02-17 22:14 出处:网络
Sorry to post a similar question to what\'s already here, but none of those solutions worked. Scenario:

Sorry to post a similar question to what's already here, but none of those solutions worked.

Scenario: - I drag a folder A (which contains anoth开发者_高级运维er folder B and then the settings.h file I want to import) from Finder into my Xcode project.

  • I set that folder to create references (thereby making this folder blue in the left-hand pane in Xcode)

  • I want to import a header file, settings.h

How do I do this? I've tried everything. Add $(PROJECT_HOME)/FolderA/** to user header search paths, $(PROJECT_HOME)/FolderA/FolderB, etc.

I've tried

#import "./FolderA/FolderB/settings.h"
#import "settings.h"

etc. etc.

The only thing that works is the absolute path on my harddrive, which of course isn't useful because then you can't work on another machine without having to change settings.

I'm pulling my hair out because all the suggestions up until now have made sense, but unfortunately don't work.

0

精彩评论

暂无评论...
验证码 换一张
取 消