错误:""_ OBJC_METACLASS _ $ _ CDVViewController",引用自:"在Xcode4.3中

kan*_*nan 6 ios5 xcode4.3 cordova cordova-2.0.0

我也是iphone开发和phonegap的新手.现在我想用phonegap创建简单的iphone应用程序.现在我在lion mac中使用phonegap2.0.我的Xcode版本是4.3.现在我的问题是在我的模拟器5.0中运行Xcode后在xcode中安装phonegap2.0.我得到以下错误.

"Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CDVViewController", referenced from:
      _OBJC_CLASS_$_ViewController in ViewController.o
      objc-class-ref in AppDelegate.o
  "_OBJC_METACLASS_$_CDVViewController", referenced from:
      _OBJC_METACLASS_$_ViewController in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)" 
Run Code Online (Sandbox Code Playgroud)

请帮我解决这个问题.提前致谢.我已附加错误页面的屏幕截图供您参考. 在此输入图像描述

sch*_*unk 13

检查您的项目是否链接libCordova.a(在我的情况下Xcode忘记了参考,将CordovaLib.xcodeproj移动到另一个位置).

  • Project Navigator中选择您的项目
  • 转到摘要选项卡
  • 拖动CordovaLib.xcodeproj > Products > libCordova.a链接的框架和库

在此输入图像描述

清洁和建设.