Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CURRENT_ARCH not expanding correctly?

Tags:

xcode

ios

unity3d

I have an Xcode project (Xcode 6.3.1) with the following library search paths set:

"$(SRCROOT)/Libraries/ScaleformLib/${CURRENT_ARCH}/clang/${CONFIGURATION}_NoRTTI" "$(SRCROOT)/Libraries/ScaleformLib/${CURRENT_ARCH}/clang/"

When building I get linker errors, which seem to be due to the CURRENT_ARCH variable not expanding correctly (paths shortened/removed for clarity):

Ld Unity-iPhone.build/Objects-normal/armv7/mud normal armv7
cd builds/iOSSubmission
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"
clang++ -arch armv7 -isysroot
-L/builds/iOSSubmission/Libraries/ScaleformLib/arm64/clang/Release_NoRTTI
-L/builds/iOSSubmission/Libraries/ScaleformLib/arm64/clang

I'm unsure why arm64 is being inserted into the search paths when it seems like it should be armv7? What am I missing?

Thanks!

like image 217
Mantus Avatar asked May 26 '15 10:05

Mantus


1 Answers

Original answer was wrong but this one works.

So for us, it came down to header search path for a .dylib. We needed libxml2 so we had header search path set to

/usr/include/libxml2

This isn't SDK dependent (shouldn't the dylib actually link to the SDK we're using?) so we changed it to:

$(SDKROOT)/usr/include/libxml2

And everything was fine.

like image 97
plluke Avatar answered Oct 26 '22 00:10

plluke