Core-plot配置错误 [英] Core-plot configuration error
问题描述
http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications ,这是
您可以使用标准Mac安装程序软件包或手动安装SDK。
将CorePlotSDK目录复制到〜/ Library / SDKs / li>添加到项目的.PCH文件:
#import< Core Plot / CorePlot.h>
打开项目 - >编辑项目设置和所有配置:
-
将QuartzCore框架添加到项目。 / p>
Copy the CorePlotSDK directory to ~/Library/SDKs/
Add to your project's .PCH file:
#import < CorePlot/CorePlot.h >
Open Project -> Edit Project Settings and for All Configurations:
Add the QuartzCore framework to the project.
Add a CPGraph to your application.
3a。添加到其他SDKS:
$ HOME / Library / SDKs / CorePlotSDK / $ {PLATFORM_NAME} .sdk
3b。添加到其他链接器标志:
-ObjC -all_load -lCorePlot
>我去了SDK安装选项:我安装了它与Mac安装程序包,它安装在以下位置/Library/SDKs/iphoneos.sdk和/Library/SDKs/iphonesimulator.sdk
然后我按照上面提到的步骤2。
对于3a我添加了/Library/SDKs/iphonesimulator.sdk p>
然后我做了3b然后4。
之后,我试图做一个构建,我收到以下错误:
:1:0:1:1:warning:__IPHONE_OS_VERSION_MIN_REQUIRED重新定义
:1:0:1:1:warning:这是上一个定义的位置
/ var / folders / + r / + rBG + BziF1OqK12XNyw1ak ++ + TM / -Caches- / com.apple.Xcode.502 / CompositeSDKs / iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln / System / Library / Frameworks / UIKit.framework / Headers / UIView.h:250:0 / var / folders / r / + rBG + BziF1OqK12XNyw1ak +++ TM / -Caches- / com.apple.Xcode.502 / CompositeSDKs / iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln / System / Library / Frameworks / UIKit.framework / Headers / UIView.h:250 :error:'^'令牌之前的语法错误
/ var / folders / + r / + rBG + BziF1OqK12XNyw1ak +++ TM / -Caches- / com.apple。 Xcode.502 / CompositeSDKs / iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln / System / Library / Frameworks / UIKit.framework / Headers / UIView.h:250:0 / var / folders / + r / + rBG + BziF1OqK12XNyw1ak +++ Caches- / com.apple.Xcode.502 / CompositeSDKs / iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln / System / Library / Frameworks / UIKit.framework / Headers / UIView.h:250:error:'type name'一个函数
这会出现20次。它指向所有的UIView.h
有同样的问题在stackoverflow和人们建议更改编译为4.2和许多人的工作,但对我来说编译器总是设置为4.2,仍然会出现同样的错误。
On 3a if / Library/SDKs/iphoneos.sdk / p>
我收到以下错误
错误:Composite SDK失败:基本SDK使用平台'iphonesimulator'一个额外的SDK使用平台'iphoneos'。所有SDK必须使用相同的平台(PLATFORM_NAME)。
请帮助
最后,我找出了这个错误的解决方案:
感谢核心绘图项目的开发人员和sebastien.leduc一个谷歌代码用户的帮助。
我使用CorePlotInstaller_0.2.2.zip,安装指南中缺少的一个重要步骤是您必须使用LLVM GCC 4.2而不是GCC 4.2。 / p>
其他重要的步骤,我很困惑我是3a。
添加到其他SDKS:$ HOME / Library / SDKs / CorePlotSDK / $ {PLATFORM_NAME} .sdk
在这里,您必须逐字添加上述行,我用iphoneos或iphonesimulator更改$ {PLATFORM_NAME} 没有,我们不必这样做。
最后一件事,如果你在以下路径找不到sdk $ HOME / Library / SDKs / CorePlotSDK
查看/ Library / SDKs / CorePlotSDK。
,我花了大约一个星期的时间,帮助所有前来帮助的人。
I am trying to use core-plot and I followed the instruction from the following project page to use it.
http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications, which is
You can install the SDK with a standard Mac installer package, or by hand. Here is how you install by hand.
3a. Add to Additional SDKS: $HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
3b. Add to Other Linker Flags: -ObjC -all_load -lCorePlot
I went with the SDK install options: I installed it with Mac installer Package, it got installed in the following location /Library/SDKs/iphoneos.sdk and /Library/SDKs/iphonesimulator.sdk
Then i did step 2 as mentioned.
For 3a i added /Library/SDKs/iphonesimulator.sdk
Then i did 3b and then 4.
After that I tried to do a build and see how does it works and i get the following errors:
:1:0 :1:1: warning: "__IPHONE_OS_VERSION_MIN_REQUIRED" redefined
:1:0 :1:1: warning: this is the location of the previous definition
/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: syntax error before '^' token
/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: 'type name' declared as function returning a function
This appears 20 times. and it points all to UIView.h
There are same question in the stackoverflow and people suggested to change the compiler to 4.2 and for lot of people it worked, but for me the compiler was always set to 4.2 and still I get the same error.
On 3a if do /Library/SDKs/iphoneos.sdk
I get the following error
error: Composite SDK failed: The base SDK uses platform 'iphonesimulator', but an additional SDK uses platform 'iphoneos'. All SDKs must use the same platform (PLATFORM_NAME).
Please help
Finally, I have figured out the solution for this error:
Thanks to the developer on core-plot project and sebastien.leduc a google code user for their help.
I am using CorePlotInstaller_0.2.2.zip, and one important steps that is missing on the installation guide is you have to use LLVM GCC 4.2 and not GCC 4.2.
The other important steps which was little confused me was 3a.
Add to Additional SDKS: $HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
Here you have to literally add the above line, I was changing the ${PLATFORM_NAME} with iphoneos or iphonesimulator, but no we don't have to do that.
One last thing if you don't find the sdk on the following path $HOME/Library/SDKs/CorePlotSDK
Check out /Library/SDKs/CorePlotSDK.
I hope this will help people, it took me about a week to figure out with the help of all the people who came forward to help.
这篇关于Core-plot配置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!