为什么在使用 Core Plot 构建 iPhone 应用程序时会看到以下链接器错误?

发布于 2024-11-09 04:30:17 字数 1937 浏览 3 评论 0原文

在构建使用 Core Plot 框架的 iPhone 应用程序时,我看到以下链接器错误:

ld: warning: ignoring file /Users/taxtmart5/Library/Developer/Xcode/DerivedData/Solagen_Calculator-cwvwcdlnuukfftakggygqoczxyuy/Build/Products/Debug-iphoneos/libCorePlot-CocoaTouch.a, file was built for archive which is not the architecture being linked (armv6)
Undefined symbols for architecture armv6:
  "_OBJC_CLASS_$_CPPlotRange", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPXYGraph", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPLineStyle", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPTextStyle", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPAxisLabel", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPBarPlot", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_CPDecimalFromString", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_OBJC_CLASS_$_CPColor", referenced from:
      objc-class-ref in PlotItem.o
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPMutableTextStyle", referenced from:
      objc-class-ref in PlotItem.o
  "_OBJC_CLASS_$_CPFill", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPGraphHostingView", referenced from:
      objc-class-ref in PlotItem.o
  "_CPDecimalFromFloat", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_kCPPlainWhiteTheme", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_OBJC_CLASS_$_CPTheme", referenced from:
      objc-class-ref in VerticalBarChart.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status

在 Xcode 3.x 下,我能够成功构建此项目,但使用 Xcode 4 时,它在定位设备时会出现上述错误(模拟器仍然可以正确构建)。

可能是什么原因导致这些错误,以及如何修复这些错误?

When building an iPhone app that uses the Core Plot framework, I am seeing the following linker errors:

ld: warning: ignoring file /Users/taxtmart5/Library/Developer/Xcode/DerivedData/Solagen_Calculator-cwvwcdlnuukfftakggygqoczxyuy/Build/Products/Debug-iphoneos/libCorePlot-CocoaTouch.a, file was built for archive which is not the architecture being linked (armv6)
Undefined symbols for architecture armv6:
  "_OBJC_CLASS_$_CPPlotRange", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPXYGraph", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPLineStyle", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPTextStyle", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPAxisLabel", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPBarPlot", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_CPDecimalFromString", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_OBJC_CLASS_$_CPColor", referenced from:
      objc-class-ref in PlotItem.o
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPMutableTextStyle", referenced from:
      objc-class-ref in PlotItem.o
  "_OBJC_CLASS_$_CPFill", referenced from:
      objc-class-ref in VerticalBarChart.o
  "_OBJC_CLASS_$_CPGraphHostingView", referenced from:
      objc-class-ref in PlotItem.o
  "_CPDecimalFromFloat", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_kCPPlainWhiteTheme", referenced from:
      -[VerticalBarChart renderInLayer:withTheme:] in VerticalBarChart.o
  "_OBJC_CLASS_$_CPTheme", referenced from:
      objc-class-ref in VerticalBarChart.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status

Under Xcode 3.x, I was able to build this project successfully, but with Xcode 4 it gives the above errors when targeting the device (the Simulator still builds correctly).

What could be causing these errors, and how can I fix them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清晰传感 2024-11-16 04:30:17

来解决我的问题

我可以通过更改构建设置、

架构

:标准(armv6,armv7)仅构建活动架构:是。

I could solve my problem by

making change in build settings,

architecture :standard (armv6,armv7)

Build active architecture only : Yes.

意中人 2024-11-16 04:30:17

清理您的项目,库之间似乎不匹配,因此链接不起作用。

Clean your project, it appears there is a mismatch between libraries and so link does not work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文