2

I want to use core plot in my project to display bar&scatter plots.Before that I made a prototype project where I was successful in plotting those two. But when I tried to include it into my project faced some problems.

1) My project has a static library so according to the https://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications, I added coreplot-cocoatouch.xcodeproj added too as a static library to my project and i set linker flags -ObjC as well for my app project then compiler throws a Mac linker error "Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1"

2) If I did not include -ObjC it throws error "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString sizeWithTextStyle:]: unrecognized selector sent to instance "

I am not able to find where am I doing wrong.Is it the problem with ARC because my project doesnt use ARC but as per some forums, I found we can use non ARC and ARC libraries in a single workspace.

I tried with CorePlot versions 1.3 and 1.4 & using Xcode 4.5, are these two arc or not.

Any help is appreciated.

Thanks in Advance.

4

2 回答 2

2

1 可能的原因可能是您的构建目录中有 2 个不同版本(重复)的 Core-Plot Exists .. 或者您的代码中有 #import .m 类而不是 .h .. 如果您有 2 个,有时会发生同样的事情您的代码中存在具有相同名称的不同类。也请尝试清理您的构建目录并再次检查。

于 2013-11-27T06:40:25.423 回答
1
  1. 使用 Core Plot 依赖项目预构建的静态库,而不是两者。

  2. -ObjC链接器标志是必需的。您还需要-all_load链接器标志。该错误消息意味着 Core Plot 添加的类别方法之一在运行时未加载;该-all_load标志告诉链接器确保应用程序也知道加载这些方法。

于 2013-11-16T13:59:16.843 回答