【发布时间】:2013-12-07 01:30:19
【问题描述】:
我从命令行构建全新的 PhoneGap 应用时遇到链接器错误。它创建了一堆文件,如果我在 Xcode 中打开创建的.xcodeproj,它就可以正常构建。那么我的命令行环境有什么问题呢?
$ phonegap create /tmp/buildtest-ios
$ cd /tmp/buildtest-ios
$ phonegap -V build ios
[phonegap] detecting iOS SDK environment...
[phonegap] Checking iOS requirements...
[phonegap] using the local environment
[phonegap] compiling iOS...
[phonegap] Generating config.xml from defaults for platform "ios"
[phonegap] Compiling app on platform "ios" via command "/private/tmp/buildtest-ios/platforms/ios/cordova/build"
[error] An error occurred while building the ios project.** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
The following build commands failed:
Ld /private/tmp/buildtest-ios/platforms/ios/build/emulator/HelloWorld.app/HelloWorld normal i386
(1 failure)
如果我自己从命令行运行有问题的Ld 命令,我会得到“找不到文件”。这是否意味着编译器失败并且链接器错误只是一个红鲱鱼?
这是 Mac OS X 10.9 上的 PhoneGap 3.3.0-0.18.0。我可以通过这个安装创建和构建一个 Android 应用程序,没有问题。如果我直接使用cordova,我会得到完全相同的行为。我已经在两台具有相同症状的 Mac 上进行了尝试。
【问题讨论】:
-
检查所有路径变量是否设置正确
-
@Purus 哪些路径变量?可以链接到文档吗?