CorePlot-CocaTouch项目中编译错误

发布于 2024-08-31 05:53:53 字数 829 浏览 5 评论 0原文

我在编译当前版本时遇到问题。 今天我可以使用以下命令下载源发行版的副本:

hg clone https://core-plot .googlecode.com/hg/ core-plot

我打开了“core-plot/framework”。 然后,我双击 CorePlot-CocoaTouch.xcodeproj 来启动 Xcode。 当我构建项目时,出现以下错误:

-(void)bind:(NSString *)binding toObject:(id)observable withKeyPath:(NSString *)keyPath options:(NSDictionary *)options
{
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
    [NSException raise:CPException format:BindingsNotSupportedString];
                                          Format not a string literal and no formal arguments
#else
    [super bind:binding toObject:observable withKeyPath:keyPath options:options];
#endif
}

我正在一台操作系统为 10.6 的新 MacBook 和 iPhone Simulator 4.0 上运行。 任何帮助将不胜感激。

查尔斯

I'm having trouble compiling the current release.
I was able to download a copy of the source distribution today using:

hg clone https://core-plot.googlecode.com/hg/ core-plot

I opened the "core-plot/framework".
I then double clicked on CorePlot-CocoaTouch.xcodeproj to launch Xcode.
When I build the project I get the following error:

-(void)bind:(NSString *)binding toObject:(id)observable withKeyPath:(NSString *)keyPath options:(NSDictionary *)options
{
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
    [NSException raise:CPException format:BindingsNotSupportedString];
                                          Format not a string literal and no formal arguments
#else
    [super bind:binding toObject:observable withKeyPath:keyPath options:options];
#endif
}

I am running on a new MacBook with OS 10.6, and IPhone Simulator 4.0.
Any help will be greatly appreciated.

Charles

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

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

发布评论

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

评论(2

写给空气的情书 2024-09-07 05:53:53

提出此问题的更合适位置是Core Plot 邮件列表,因为我是少数几个定期访问这里的项目开发人员之一。

也就是说,这里的问题是我们使用字符串常量作为格式字符串,Xcode 现在似乎对此发出警告(没错,因为这可能会导致问题)。要暂时解决此问题,您可以将 CPLayer.m 中的行替换

static NSString * const BindingsNotSupportedString = @"Bindings are not supported on the iPhone in Core Plot";

#define BindingsNotSupportedString @"Bindings are not supported on the iPhone in Core Plot"

A more appropriate place to ask this question would be the Core Plot mailing list, because I'm one of the few developers for the project that regularly visits here.

That said, the issue here is that we're using a string constant for a format string, which Xcode now seems to be warning about (rightly so, as this can lead to problems). To work around this for now, you can replace the line in CPLayer.m

static NSString * const BindingsNotSupportedString = @"Bindings are not supported on the iPhone in Core Plot";

with

#define BindingsNotSupportedString @"Bindings are not supported on the iPhone in Core Plot"
就是爱搞怪 2024-09-07 05:53:53

在您的项目中搜索 BindingsNotSupportedString,它似乎不在当前文件中,因此需要包含在内。或者只是尝试将其更改为可接受的格式。

Search in your project for BindingsNotSupportedString, seems like it's not in the current file and therefore needs to be included. Or just try to change this to an acceptable format.

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