XCode 4.2 cocos2d iPhone项目失败。 id:找不到-lz.1.2.3的库

时间:2011-10-30 22:44:34

标签: iphone objective-c xcode cocos2d-iphone ios5

刚刚用4.2替换了我的XCode 4.0.1。试图运行我正在进行的iPhone游戏项目,遇到了错误:

ld:找不到-lz.1.2.3的库 Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++以退出代码1失败

全文:

Ld "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator/Hit The Road.app/Hit The Road" normal i386
    cd "/MyProjects/Hit The Road"
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator -F/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator -filelist "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Intermediates/HitTheRoad.build/Debug-iphonesimulator/Drive.build/Objects-normal/i386/Hit The Road.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lz -ObjC -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 -lz.1.2.3 -weak_framework MapKit -framework CoreLocation -weak_framework GameKit -framework AddressBookUI -framework AddressBook -framework CFNetwork -framework MobileCoreServices -lsqlite3.0 -framework SystemConfiguration -framework Security -framework QuartzCore -weak_framework UIKit -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework AVFoundation -weak_framework Foundation -framework CoreGraphics -o "/Users/sergiibondar/Library/Developer/Xcode/DerivedData/HitTheRoad-ccehewjarqhrkacsekxxcuewglcx/Build/Products/Debug-iphonesimulator/Hit The Road.app/Hit The Road"

试图弄清楚出了什么问题,发现它可能与Mac OS X部署目标有关。所以我试着把它设置为10.4 10.5和10.6。不幸的是它没有帮助。

我正在研究MacOS 10.6.8

之前有人遇到过这样的错误吗? 也许有人至少知道这个错误是什么?

1 个答案:

答案 0 :(得分:3)

单击文件导航器中的项目,然后选择目标。向下滚动到链接的框架和库,找到正在使用的libz库并将其删除,名称可能会显示为红色。接下来,单击“+”并键入 libz 并添加1.2.3或更高版本。通常,只需选择 libz.dylib 即可。最后,清理并重建。