Search code examples
xcodebuildlinkerstatic-linking

how to link to different static binary base on configuration in Xcode?


I have a library that has both debug build and release build, how do I let Xcode link to the corresponding library base on the current configuration (debug/release)?


Solution

  • I have the same problem except with frameworks instead of static libraries. Having different framework search paths for different configuration and doing -framework YourFramework.framework for both configurations should work but seems not so clean. (or same approach with static libraries)