Selective library linking Xcode 6 / LLVM 6

I will selectively link the library based on configuration in my project build settings. i.e.

Debug: -l libcws_ps Release: -l libcws

In the library search pools, I specify the directory containing these 2.a libraries.

I'll point out that this worked on Xcode 5, but now on Xcode 6, it doesn't link correctly and I get undefined symbol errors. If I use the normal method - 'link binary with libraries' then it works, but then I have no configuration based linking.

Any ideas how to fix this, or at least some hints how I am debugging it?

Libtool /Users/dave/Library/Developer/Xcode/DerivedData/FilmFlexMovies-ddwyjuvbhaqgqralpjczhprnltla/Build/Products/Release-iphoneos/libiOSIrdetoLibrary.a normal armv7
cd /Users/dave/Developer/GIT/FilmFlex/iOS/Submodules/iOSModelController/Submodules/iOSIrdetoLibrary
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/dave/Library/Developer/Xcode/DerivedData/FilmFlexMovies-ddwyjuvbhaqgqralpjczhprnltla/Build/Products/Release-iphoneos -LCloakwareStreaming/lib/ios -L/Users/dave/Developer/GIT/FilmFlex/iOS/Submodules/iOSModelController/Submodules/iOSIrdetoLibrary/CloakwareStreaming/lib/ios -filelist /Users/dave/Library/Developer/Xcode/DerivedData/FilmFlexMovies-ddwyjuvbhaqgqralpjczhprnltla/Build/Intermediates/iOSIrdetoLibrary.build/Release-iphoneos/iOSIrdetoLibrary.build/Objects-normal/armv7/iOSIrdetoLibrary.LinkFileList -framework MediaPlayer -framework CoreVideo -framework AVFoundation -framework UIKit -framework Foundation -o /Users/dave/Library/Developer/Xcode/DerivedData/FilmFlexMovies-ddwyjuvbhaqgqralpjczhprnltla/Build/Products/Release-iphoneos/libiOSIrdetoLibrary.a

      

+3


source to share


1 answer


RTFM ... or RTFRN ... Xcode 6 Release Notes

"Xcode will no longer pass parameters in the OTHER_LDFLAGS build setting to libtool when creating static libraries, and will not pass parameters to OTHER_LIBTOOLFLAGS to the Mach-O linker when building any other product. Previously, all parameters in both parameters must be passed to both tools. Make sure the parameters are in in the correct build setup for the product type, static library, or other component. (4285249) "



So it just didn't pass my "other linker flags". I needed to move them to "other library flags".

+6


source







All Articles