构建iOS项目时遇到Google Cast 2.6.0错误 [英] Google Cast 2.6.0 errors when building iOS project

查看:169
本文介绍了构建iOS项目时遇到Google Cast 2.6.0错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您在更新到新的Google Cast 2.6.0框架后构建您的iOS项目时遇到了任何错误?

Any of you guys had errors when building your iOS project after updating to the new Google Cast 2.6.0 framework?

我遇到以下错误:
默认初始化const类型为const NSInteger(aka'const int')的对象。
在类GCKDevice中的下面几行:

I get the following error: Default initialisation of an object of const type ‘const NSInteger’ (aka ‘const int’). at the following lines in class GCKDevice:

/** Device capability flag for video out. */
GCK_EXPORT const NSInteger kGCKDeviceCapabilityVideoOut;
/** Device capability flag for video in. */
GCK_EXPORT const NSInteger kGCKDeviceCapabilityVideoIn;
/** Device capability flag for audio out. */
GCK_EXPORT const NSInteger kGCKDeviceCapabilityAudioOut;
/** Device capability flag for audio in. */
GCK_EXPORT const NSInteger kGCKDeviceCapabilityAudioIn;


推荐答案

此版本的SDK中有一个错误在Objective-C ++下编译的文件。如果从.mm文件导入类,则会丢失extern,这将触发问题。作为解决方法,如果你可以将代码移动到一个正常的.m文件,你应该是OK(你应该可以调用,只要你没有暴露GCK头到mm)。

There is a bug in this version of the SDK for files compiled under Objective-C++. If you import the classes from a .mm file, there is a missing extern which will trigger a problem. As a workaround, if you can move you code to a regular .m file you should be OK (and you should be able to call out to that as long as you don't expose the GCK headers to the mm).

这篇关于构建iOS项目时遇到Google Cast 2.6.0错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆