1

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

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;
Dora
  • 11
  • 3

2 Answers2

1

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).

Ian Barber
  • 19,765
  • 3
  • 58
  • 58
0

For me it helped to switch the "No Common Blocks" compiler setting to NO:

enter image description here

It pretty much seems to make sense, this setting defines how duplicate variable definitions are handled by the compiler. It is explained here: What is GCC_NO_COMMON_BLOCKS used for?

Community
  • 1
  • 1
joobik.com
  • 96
  • 2