I am working with someone's library . . . they have set $(SRCRoot) to the location the library was in on their computer. On my computer, it is in a different location. This is messing everything up. How do I change it?
You must define SRCRoot
, not $(...)
, because the $(x)
command returns the value stored in x
.
SRCROOT
, like any Xcode build variable, is set in the Build options in the Target settings. However, setting SRCROOT
is not supported through the interface options (because you shouldn't set it manually in the first place), so it'll fall under "User-Defined" settings if someone set it manually. You'll want to select it and then delete it. Here's a picture to demonstrate:
SRCRoot is one of the default variables of Xcode
The best source is probably Apple's official documentation
Adding a custom user setting (SRCROOT) will work only partially. If your project is under source control you may find that source files are marked red - i.e. Xcode cannot locate them.
Simply open up the project file into a text editor and replace all occurrences of the old source code folder name.
Works fine.
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