Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build static library in Xcode 4. What happen with ${BUILD_STYLE}?

Tags:

xcode

static

I use Xcode 4.2. I'm building a static framework.

I built 2 libs: lib-simulator.a for simulator, lib-iphoneos.a for device.

In the aggregate target, I put the script:

rm -rf ${BUILT_PRODUCTS_DIR}/libAggregate.a

lipo -create "${BUILT_PRODUCTS_DIR}/../${BUILD_STYLE}-iphonesimulator/liblib-simulator.a" "${BUILT_PRODUCTS_DIR}/liblib-iphoneos.a" -output "${BUILT_PRODUCTS_DIR}/libAggregate.a"

Then I build the aggregate target, it failed. The log below:

lipo: can't open input file: /Users/vietnt/Library/Developer/Xcode/DerivedData/testCreateLib-ftdlqzrlflzkkkczafzhqrvxvgkx/Build/Products/Release-iphoneos/../-iphonesimulator/lib-simulator.a (No such file or directory)

I see there is a lack of rendering the ${BUILD_STYLE} in to the command as the bold word.

If I build my project in Xcode 3.2.6, it's OK, then generate the libAggregate.a file.

Please help me. Thank you!

EDIT:

I resolved that.

${BUILD_STYLE} is changed to ${CONFIGURATION} in Xcode 4

Happy!

like image 803
vietstone Avatar asked Nov 03 '11 08:11

vietstone


1 Answers

I resolved that.

${BUILD_STYLE} is changed to ${CONFIGURATION} in Xcode 4

Happy!

like image 135
vietstone Avatar answered Oct 11 '22 19:10

vietstone