How to use GCMathParser in iOS 5 application (XCode 4.2) with ARC?

三世轮回 提交于 2019-12-11 19:15:25

问题


After changing
- #import <Cocoa/Cocoa.h> to #import <UIKit/UIKit.h>
- "pi" to "M_PI"
and disabling ARC for the GCMathParser files, I get the following error: (multiple places)

Cast of C pointer type "void*" to Objective-C pointer type "GCMathParser*" requires a bridged cast

What do I have to do?

Thanks


回答1:


ARC doesn't let you hide objects behind untyped pointers -- it needs to know which pointers are objects in order to do its magic. If you're dealing with a framework that relies heavily on that trick, you may have to do a fair amount of re-architecting it. Not fun.

You might try DDMathParser instead; it's functionally similar, more extensible, and supports ARC and iOS "out of the box".



来源:https://stackoverflow.com/questions/10850698/how-to-use-gcmathparser-in-ios-5-application-xcode-4-2-with-arc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!