简体   繁体   English

核心图错误

[英]Core-Plot error

I want to use a graph in my iPhone app. 我想在我的iPhone应用程序中使用图形。 I have downloaded the source code Core- Plot for it, but now when I am trying to run it I am getting an error. 我已经为其下载了源代码CorePlot,但是现在当我尝试运行它时,我得到了一个错误。

clang: error: -Z-reserved-lib-stdc++: 'linker' input unused when '-c' is present

Can anyone suggest me what this error mean or how to resolve it. 任何人都可以建议我这个错误的含义或解决方法。

`iPhone, iPod Touch, and/or iPad Application iPhone,iPod Touch和/或iPad应用程序

Dependent Project Install Because frameworks cannot be used in Cocoa Touch applications in the same way as on the Mac, the means of including Core Plot within an iPhone application are slightly different. 依赖项目的安装由于不能像在Mac上那样在Cocoa Touch应用程序中使用框架,因此在iPhone应用程序中包括Core Plot的方法略有不同。

First, drag the CorePlot-CocoaTouch.xcodeproj file into your iPhone application's Xcode project. 首先,将CorePlot-CocoaTouch.xcodeproj文件拖到iPhone应用程序的Xcode项目中。 Show the project navigator in the left-hand list and click on your project. 在左侧列表中显示项目导航器,然后单击您的项目。

Select your application target from under the "Targets" source list that appears. 从出现的“目标”源列表下选择您的应用程序目标。 Click on the "Build Phases" tab and expand the "Target Dependencies" group. 单击“构建阶段”选项卡,然后展开“目标依赖项”组。 Click on the plus button, select the CorePlot-CocoaTouch library, and click Add. 单击加号按钮,选择CorePlot-CocoaTouch库,然后单击添加。 This should ensure that the Core Plot library will be built with your application. 这应该确保Core Plot库将随您的应用程序一起构建。

Core Plot is built as a static library for iPhone, so you'll need to drag the libCorePlot-CocoaTouch.a static library from under the CorePlot-CocoaTouch.xcodeproj group to the "Link Binaries With Libraries" group within the application target's "Build Phases" group you were just in. Core Plot是作为iPhone的静态库构建的,因此您需要将libCorePlot-CocoaTouch.a静态库从CorePlot-CocoaTouch.xcodeproj组下面拖动到应用程序目标的“ Build”中的“ Link Binaries With Libraries”组中。您刚加入的“阶段”组。

You'll also need to point to the right header location. 您还需要指向正确的标题位置。 Under your Build settings, set the Header Search Paths to the relative path from your application to the framework/ subdirectory within the Core Plot source tree. 在Build设置下,将Header Search Paths设置为从应用程序到Core Plot源树内的framework /子目录的相对路径。 Make sure to make this header search path recursive. 确保使此标头搜索路径是递归的。 You need to add -ObjC to Other Linker Flags as well (as of Xcode 4.2, -all_load does not seem to be needed, but it may be required for older Xcode versions). 您还需要将-ObjC添加到其他链接器标志中(从Xcode 4.2开始,似乎不需要-all_load,但对于较旧的Xcode版本则可能需要)。

Core Plot is based on Core Animation, so if you haven't already, add the QuartzCore framework to your application project. Core Plot基于Core Animation,因此,如果尚未将QuartzCore框架添加到您的应用程序项目中。

Finally, you should be able to import all of the Core Plot classes and data types by inserting the following line in the appropriate source files within your project: 最后,您应该能够通过在项目中适当的源文件中插入以下行来导入所有Core Plot类和数据类型:

import "CorePlot-CocoaTouch.h"` 导入“ CorePlot-CocoaTouch.h”`

Source: core plot wiki on google 资料来源: Google核心剧情Wiki

I got a solution for it here is the link. 我为它找到了解决方案,这里是链接。

CorePlot failed to build in XCode 4.4 CorePlot无法在XCode 4.4中构建

Basically the issue was related to Xcode. 基本上,该问题与Xcode有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM