Problem building cocos2d-2.1rc0-x-2.1.2 for iOS

Hi.

I`ve trying to compile cocos2d-2.1rc0-x-2.1.2 for iOS (for Simulator and for Device), using cocos2dx.xcodeproj, but received the message

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: for architecture cputype (12) cpusubtype (11) object: /Users/administrator/Downloads/cocos2d-2.1rc0-x-2.1.2/cocos2dx/proj.ios/…/platform/third_party/ios/libraries/libwebp.a(libwebpdecode_la-alpha.o) malformed object (unknown load command 4)

Any tip?

Thanks

Jose

How did you compile it?
Could you please describe the steps?

Hi.

Just loaded the HelloCpp project in Xcode 3 and tried to build.

Perhaps Xcode 3 isn´t supported anymore (the templates only work for Xcode 4)?

Yes, Xcode 3 isn’t supported.
Jose Marin wrote:

Hi.
>
Just loaded the HelloCpp project in Xcode 3 and tried to build.
>
Perhaps Xcode 3 isn´t supported anymore (the templates only work for Xcode 4)?

@James Chen

i have xcode 4.6.1 and the templates doesn’t work. :frowning:
is this right?

i just run from another way and it is a successful. :smiley:

Hey guys.

I get the same libtool error with Xcode 4.2 (latest version of Xcode this Snow Leopard Mac can handle).

It was very confusing at first because Xcode just said “libtool failed with exit code 1” without any further error messages. After manually copying the libtool commands to the Terminal, more specific errors were gained.

The errors are:

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: for architecture armv7 object: /Users/nat/Art/iPhone/Awesome/Code/cocos2d-x/cocos2dx/proj.ios/…/platform/third_party/ios/libraries/libwebp.a(libwebpdecode_la-alpha.o) malformed object (unknown load command 4)

/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: for architecture cputype (12) cpusubtype (11) object: /Users/nat/Art/iPhone/Awesome/Code/cocos2d-x/cocos2dx/proj.ios/…/platform/third_party/ios/libraries/libwebp.a(libwebpdecode_la-alpha.o) malformed object (unknown load command 4)

I worked around these errors by removing libwebp.a from the iOS project’s Build Phases > Link Binary With Libraries section and then commenting out everything but “return false;” from CCImage::_initWithWebpData in platform/CCImageCommonWebp.cpp.

After removing the library and the calls to Webp stuff, I can again run the project on iOS.

That´s my solution also.

I´ve removed all references to Webp, and now I can compile using Xcode 3.2 .

Not the best solution, I admit…