How do I use a relative path in Xcode project settings?
Relative paths make use of two special symbols, a dot (.) and a double-dot (..), which translate into the current directory and the parent directory. Double dots are used for moving up in the hierarchy. A single dot represents the current directory itself.
An absolute path is defined as specifying the location of a file or directory from the root directory(/). In other words,we can say that an absolute path is a complete path from start of actual file system from / directory. Relative path is defined as the path related to the present working directly(pwd).
In simple words, an absolute path refers to the same location in a file system relative to the root directory, whereas a relative path points to a specific location in a file system relative to the current directory you are working on.
All paths in Build Settings are assumed relative to the directory that contains the .xcodeproj file. Use the standard Unix path tokens
. project directory .. parent directory
So if your project file is trunk/Mac/proj.xcodeproj, and your headers are in trunk/Headers/foo.h, you would add ../Headers to your Header Search Paths.
Also there are two paths: $SRCROOT and $SDKROOT.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With