使用 Core Plot iPhone - 链接器错误

发布于 2024-11-01 21:36:18 字数 7231 浏览 2 评论 0原文

当我尝试在项目中使用 Core Plot 时,我不断收到以下链接器错误...

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CPXYGraph", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPPlotRange", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPLineStyle", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPColor", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPScatterPlot", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPPlotSymbol", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPFill", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  ".objc_class_name_NSNumber", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPUtilities.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTradingRangePlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPieChart.o)
  ".objc_class_name_NSMutableDictionary", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTheme.o)
  ".objc_class_name_NSDecimalNumber", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(NSNumberExtensions.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPUtilities.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlotRange.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
      ...
  ".objc_class_name_NSMutableArray", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGraph.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTradingRangePlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPieChart.o)
  ".objc_class_name_NSArray", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGraph.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxisSet.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTheme.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTradingRangePlot.o)
      ...
  ".objc_class_name_NSException", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGraph.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGradient.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPLayer.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPXYPlotSpace.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTheme.o)
      ...
  ".objc_class_name_NSNull", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
  ".objc_class_name_NSValueTransformer", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTradingRangePlot.o)
  ".objc_class_name_NSObject", referenced from:
      .objc_class_name_CPPlotSymbol in libCorePlot.a(CPPlotSymbol.o)
      .objc_class_name_CPPlotSpace in libCorePlot.a(CPPlotSpace.o)
      .objc_class_name_CPPlotRange in libCorePlot.a(CPPlotRange.o)
      .objc_class_name_CPFill in libCorePlot.a(CPFill.o)
      .objc_class_name_CPGradient in libCorePlot.a(CPGradient.o)
      .objc_class_name_CPImage in libCorePlot.a(CPImage.o)
      .objc_class_name_CPLineStyle in libCorePlot.a(CPLineStyle.o)
      ...
  ".objc_class_name_NSNotificationCenter", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGraph.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPXYPlotSpace.o)
  ".objc_class_name_NSString", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPUtilities.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlotRange.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPLayer.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTextLayer.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxisLabel.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxisTitle.o)
      ...
  ".objc_class_name_NSScanner", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPUtilities.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
  ".objc_class_name_NSLocale", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlotRange.o)
  ".objc_class_name_UIColor", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlatformSpecificCategories.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPLayerHostingView.o)
  ".objc_class_name_NSMutableData", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPLayer.o)
  ".objc_class_name_CALayer", referenced from:
      .objc_class_name_CPLayer in libCorePlot.a(CPLayer.o)
  ".objc_class_name_NSMutableSet", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
  ".objc_class_name_NSNumberFormatter", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
      .objc_class_name_CPTimeFormatter in libCorePlot.a(CPTimeFormatter.o)
  ".objc_class_name_NSSet", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
  ".objc_class_name_UIView", referenced from:
      .objc_class_name_CPLayerHostingView in libCorePlot.a(CPLayerHostingView.o)
  ".objc_class_name_NSDateFormatter", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTimeFormatter.o)
  ".objc_class_name_NSDate", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTimeFormatter.o)
  ".objc_class_name_UIFont", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTextStylePlatformSpecific.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

知道如何解决此问题吗?我已经尝试了两个多小时了...

我已经下载了其他示例,但我仍然遇到相同的链接器错误。

感谢任何帮助...

I kept getting the following linker error when i try using Core Plot in my project...

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CPXYGraph", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPPlotRange", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPLineStyle", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPColor", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPScatterPlot", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPPlotSymbol", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  "_OBJC_CLASS_$_CPFill", referenced from:
      objc-class-ref in CorePlotImplViewController.o
  ".objc_class_name_NSNumber", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPUtilities.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTradingRangePlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPieChart.o)
  ".objc_class_name_NSMutableDictionary", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTheme.o)
  ".objc_class_name_NSDecimalNumber", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(NSNumberExtensions.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPUtilities.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlotRange.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
      ...
  ".objc_class_name_NSMutableArray", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGraph.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTradingRangePlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPieChart.o)
  ".objc_class_name_NSArray", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGraph.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxisSet.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTheme.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTradingRangePlot.o)
      ...
  ".objc_class_name_NSException", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGraph.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGradient.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPLayer.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPXYPlotSpace.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTheme.o)
      ...
  ".objc_class_name_NSNull", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPBarPlot.o)
  ".objc_class_name_NSValueTransformer", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPScatterPlot.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTradingRangePlot.o)
  ".objc_class_name_NSObject", referenced from:
      .objc_class_name_CPPlotSymbol in libCorePlot.a(CPPlotSymbol.o)
      .objc_class_name_CPPlotSpace in libCorePlot.a(CPPlotSpace.o)
      .objc_class_name_CPPlotRange in libCorePlot.a(CPPlotRange.o)
      .objc_class_name_CPFill in libCorePlot.a(CPFill.o)
      .objc_class_name_CPGradient in libCorePlot.a(CPGradient.o)
      .objc_class_name_CPImage in libCorePlot.a(CPImage.o)
      .objc_class_name_CPLineStyle in libCorePlot.a(CPLineStyle.o)
      ...
  ".objc_class_name_NSNotificationCenter", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPGraph.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPXYPlotSpace.o)
  ".objc_class_name_NSString", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPUtilities.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlotRange.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPLayer.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTextLayer.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxisLabel.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxisTitle.o)
      ...
  ".objc_class_name_NSScanner", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPUtilities.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
  ".objc_class_name_NSLocale", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlotRange.o)
  ".objc_class_name_UIColor", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPPlatformSpecificCategories.o)
      pointer-to-literal-objc-class-name in libCorePlot.a(CPLayerHostingView.o)
  ".objc_class_name_NSMutableData", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPLayer.o)
  ".objc_class_name_CALayer", referenced from:
      .objc_class_name_CPLayer in libCorePlot.a(CPLayer.o)
  ".objc_class_name_NSMutableSet", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
  ".objc_class_name_NSNumberFormatter", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
      .objc_class_name_CPTimeFormatter in libCorePlot.a(CPTimeFormatter.o)
  ".objc_class_name_NSSet", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPAxis.o)
  ".objc_class_name_UIView", referenced from:
      .objc_class_name_CPLayerHostingView in libCorePlot.a(CPLayerHostingView.o)
  ".objc_class_name_NSDateFormatter", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTimeFormatter.o)
  ".objc_class_name_NSDate", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTimeFormatter.o)
  ".objc_class_name_UIFont", referenced from:
      pointer-to-literal-objc-class-name in libCorePlot.a(CPTextStylePlatformSpecific.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

any idea how can i fix this? i have been trying over 2 hours already...

I have downloded other examples but i m still getting the same linker error.

Appreciate any help...

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

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

发布评论

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

评论(3

生寂 2024-11-08 21:36:18

我遇到了与您相同的错误,我的问题是我没有添加 QuartzCore 框架(选择您的项目目标,展开“将二进制文件与库链接”,单击“+”以选择 QuartzCore.framework)。

I got the same error as you and my problem was that I had not added the QuartzCore framework (select your project target, expand "Link binaries with libraries", click '+' to select QuartzCore.framework).

堇色安年 2024-11-08 21:36:18

这是在 xcode 4 中吗?您可能想确保您拥有最新版本的核心情节。 Xcode 4 给我带来了一个问题,直到我下载了最新版本的 core-plot 并删除了以前的目录。

我打开触摸项目并重建,然后链接再次正常!

Is this in xcode 4? You might want to make sure that you have the latest version of core plot. Xcode 4 caused a problem for me until I downloaded the latest version of core-plot and removed the previous directory.

I open the touch project and rebuilt then the linked was OK again!

谁的年少不轻狂 2024-11-08 21:36:18

从 google code 下载的 zip 文件中添加 coreplotHeaders 库,并将 libCoreplot-CocoaTouch.a 添加到您的项目模板中。

注意:添加时不要为添加的文件夹创建文件夹引用。

Add coreplotHeaders library from zip file downloaded from google code and also add libCoreplot-CocoaTouch.a to your project template.

NB:when adding don't create folder references for folders added.

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