When I use $(BUILT_PRODUCTS_DIR)
in User Header Search Path
(as recommended in this tutorial about static libraries) XCode 4 resolves it like this:
This is a problem while I work with the simulator, because the build files are stored in Debug-iphonesimulator
instead of Debug-iphoneos
, and XCode fails to find headers.
My current workaround is build first for iOS Device, and then work with the Simulator. This is a bit tedious and error-prone. What am I doing wrong?
The build products directory should be used for output by Xcode, and it is perfectly reasonable for these directories to be nonexistent at the time you begin to build. It is not advisable to have dependencies like user headers in these directories.
My recommendation would be to move the dependent headers out of the directory you're talking about.
I had the same problem. I fixed it by doing the following. Instead of setting the User Header Search Paths to $(BUILT_PRODUCTS_DIR)
recursive, I set it explicitly to $(BUILT_PRODUCTS_DIR)/usr/local/include
non-recursive.
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