1

首先,我创建一个 xcode 项目,然后将 Cordova 添加到项目中

我是按照这个教程一步一步做的:http://docs.phonegap.com/en/2.2.0/guide_cordova-webview_ios.md.html#Embedding%20Cordova%20WebView%20on%20iOS

但仍然出现错误

Libtool /Users/wanyc/Library/Developer/Xcode/DerivedData/TestCordova-bmqmtqdeafhklhbjqbnmochohdoe/Build/Products/Debug-iphonesimulator/libCordova.a normal i386
    cd /Users/wanyc/Downloads/infoviz-ios-master/CordovaLib
    setenv IPHONEOS_DEPLOYMENT_TARGET 5.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/wanyc/Library/Developer/Xcode/DerivedData/TestCordova-bmqmtqdeafhklhbjqbnmochohdoe/Build/Products/Debug-iphonesimulator -filelist /Users/wanyc/Library/Developer/Xcode/DerivedData/TestCordova-bmqmtqdeafhklhbjqbnmochohdoe/Build/Intermediates/CordovaLib.build/Debug-iphonesimulator/CordovaLib.build/Objects-normal/i386/Cordova.LinkFileList -all_load -Obj-C -lsqlite3.0 -o /Users/wanyc/Library/Developer/Xcode/DerivedData/TestCordova-bmqmtqdeafhklhbjqbnmochohdoe/Build/Products/Debug-iphonesimulator/libCordova.a

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character `O' in: -Obj-C
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1

我发现这个错误'Add -all_load and -Obj-C - for the "Other Linker Flags" value'

4

1 回答 1

0

应该是-ObjC,不是-Obj-C这是 Apple 文档中的一个示例。

(另外,请不要显示编译器错误的屏幕截图——它们的大小被调整得太小以至于几乎无法阅读。您可以从错误日志中复制并粘贴文本。)

于 2013-01-06T09:43:52.983 回答