我从一个正常运行的绑定项目开始,但我需要为状态标志添加一个全局 int 并且我无法让它在没有错误的情况下绑定。我从示例代码开始,无法让它工作。
我添加到绑定文件的代码是:
[Static]
interface CameraEffects {
[Field ("kCameraEffectsZoomFactorKey", "CameraLibrary")]
NSString ZoomFactorKey { get; }
}
我得到三个错误:
obj/Debug/ios/PDFExpert/CameraEffects.g.cs(34,94): error CS0117: `MonoTouch.Constants' does not contain a definition for `CameraLibraryLibrary'
obj/Debug/ios/PDFExpert/CameraEffects.g.cs(34,76): error CS1502: The best overloaded method match for `MonoTouch.ObjCRuntime.Dlfcn.dlopen(string, int)' has some invalid arguments
obj/Debug/ios/PDFExpert/CameraEffects.g.cs(34,76): error CS1503: Argument `#1' cannot convert `object' expression to type `string'
如果我关闭库,它会尝试将其分配给另一个未知常量。这似乎真的搞砸了,因为它与文档无关。