Skip to content

Instantly share code, notes, and snippets.

View ivanbruel's full-sized avatar

Ivan Bruel ivanbruel

View GitHub Profile
@micahpearlman
micahpearlman / gist:4644484
Created January 26, 2013 20:38
When doing an XCode AdHoc (or any custom) build in an XCode workspace, Xcode cannot find the other projects in the workspace. To fix it do the following:
see: http://stackoverflow.com/questions/8523690/xcode-custom-build-configuration-causes-library-file-not-found-for-static-libr
In the project with the Adhoc build configuration, override the "Per-configuration Build Products Path" (CONFIGURATION_BUILD_DIR) and "Per-configuration Intermediate Build Files Path" (CONFIGURATION_TEMP_DIR) for the Adhoc build configuration to use the same folder as the release configuration.
Adhoc: CONFIGURATION_BUILD_DIR = $(SYMROOT)/Release$(EFFECTIVE_PLATFORM_NAME)
Adhoc: CONFIGURATION_TEMP_DIR = $(PROJECT_TEMP_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)
Now when you do an Adhoc build, Xcode will put libFoo.a and Bar.app in the Release-iphoneos folder. The linker will be happy and you can use -force_load $(BUILT_PRODUCTS_DIR)/libFoo.a as usual.
Alternatively, you can add the Release-iphoneos folder to the library search paths for the Adhoc build configuration: