User Header Search Paths for Xcode

后端 未结 4 1496
余生分开走
余生分开走 2021-02-02 10:22

I have two paths that I want Xcode to search for headers:

\"/myproject/lib1/include\"
\"/myproject/lib2/include\"

What\'s th

相关标签:
4条回答
  • 2021-02-02 10:51

    Xcode 6.1.1 also requires you to set Search Paths->Always Search User Paths to 'Yes' ... and have User Header Search Paths as specified in above posts.

    0 讨论(0)
  • 2021-02-02 10:52

    If you have multiple header paths, use SPACE to divide them, or double click the input text box of header pathS for advance setting. Another recommended way is search "User Header Search Paths" in your Xcode help menu.

    0 讨论(0)
  • 2021-02-02 11:06

    Dd you actually put the leading /into the path? Because that's an absolute path and probably not what you mean.

    You can pass it the relative location using $(SRCROOT) which expands the the directory containing the Xcode project file.

    So, assuming your project file is in the myroject directory you should put this in your header search paths:

    $(SRCROOT)/lib1/include
    $(SRCROOT)/lib2/include
    
    0 讨论(0)
  • 2021-02-02 11:07

    Suppose you want to use your project directory, then you should use:

    "$PROJECT_DIR" 
    

    Double quotes are advised if your project path has spaces.

    Enable recursive if you want to search within the folders as well. Alternatively, you can use "$(SRCROOT)"

    0 讨论(0)
提交回复
热议问题