gingerbeur / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

iOS - Duplicate symbols of GCKDeviceCapability constants #573

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create new XCode project - Single View Application, Objective-C
2. Install GoogleCast.framework from 
GoogleCastSDK-2.6.0-Release-ios-default.zip into project folder.
3. Add SystemConfiguration.framework and the copied GoogleCast.framework to the 
"Linked Frameworks and Libraries" configuration.
4. Add "-ObjC" to the Linking -> Other Linker Flags Build Setting as per 
documentation.
5. Add "#import <GoogleCast/GoogleCast.h>" to any file, for example 
AppDelegate.h
6. Build the project

What is the expected output? What do you see instead?
I expect the project to build successfully.  Instead, it throws a linker error 
which I have attached as linker_error.txt.  I'm attempting to write a class 
modeled after the CastVideos sample which encapsulates all of the google-cast 
interactions for the app, and when I include the GoogleCast.h in that class, I 
get even more duplicate symbols.

What version of the product are you using? On what operating system?
Apple OS X Yosemite 10.10.3
Xcode 6.3.1
GoogleCastSDK-2.6.0-Release-ios

Please provide any additional information below.
Changing the 4 capability consts from GCK_EXPORT to GCK_EXTERN in GCKDevice.h 
allows the project to build.

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

But I don't know what other kinds of issues this might cause.  I'm just getting 
started trying to port an Android app to iOS, and haven't gotten past this 
problem yet.  I have uploaded a sample project of what I'm trying to do that 
has the build error at https://github.com/nshafer/MyCastApp.

Thanks!
Nate

Original issue reported on code.google.com by Niicode...@gmail.com on 27 Apr 2015 at 5:29

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by na...@google.com on 27 Apr 2015 at 9:19