demo_iPhone_basics Xcode 8.3 compile error
Hi!
I just installed Xcode 8.3 and tried to compile Photon SDK 1.4.5.1 basic code sample.
I got one minor issue. I'm not sure if it's a Photon SDK or compiler "feature":
And my question is:
Is it safe to fix it in DictionaryBase.h (also would be nice to get advice about better way to fix it, my variants are: make Dictionary friend class of DictionaryBase or change mHashtable private->protected) or Photon SDK needs to be rebuilt?
Thank You!
I just installed Xcode 8.3 and tried to compile Photon SDK 1.4.5.1 basic code sample.
I got one minor issue. I'm not sure if it's a Photon SDK or compiler "feature":
In file included from /somewhereonmyhdd/externals/PhotonSDK/Photon-iOS-Sdk_v4-1-5-1/LoadBalancing-cpp/src/Internal/PlayerFactory.cpp:7:
In file included from ../LoadBalancing-cpp/inc/Internal/PlayerFactory.h:9:
In file included from ../Common-cpp/inc/Common.h:11:
../Common-cpp/inc/Dictionary.h:215:4: error: 'mHashtable' is a private member of 'ExitGames::Common::DictionaryBase'
mHashtable.remove(key);
^
In file included from /somewhereonmyhdd/externals/PhotonSDK/Photon-iOS-Sdk_v4-1-5-1/LoadBalancing-cpp/src/Internal/PlayerFactory.cpp:7:
In file included from ../LoadBalancing-cpp/inc/Internal/PlayerFactory.h:9:
In file included from ../Common-cpp/inc/Common.h:11:
In file included from ../Common-cpp/inc/Dictionary.h:9:
../Common-cpp/inc/DictionaryBase.h:86:14: note: declared private here
Hashtable mHashtable;
^
1 error generated.
And my question is:
Is it safe to fix it in DictionaryBase.h (also would be nice to get advice about better way to fix it, my variants are: make Dictionary friend class of DictionaryBase or change mHashtable private->protected) or Photon SDK needs to be rebuilt?
Thank You!
0
Comments
This is a known bug in the Photon Client SDK and will be fixed with the next release, which adds DictionaryBase.remove() and changes Dictionary::remove() to call the implementation of its parent class.
For now your proposed fixes will do fine without need for rebuilding the libs.
Sorry for the inconvenience.
Thanks for reply. I'll apply one of my fixes to header.
I'll share information about my trivial header fix which is works for me.
In file _YourSDKPathHere_\Photon-iOS-Sdk_v4-1-5-1\Common-cpp\inc\DictionaryBase.h on line 86 there is a code:
Hashtable mHashtable;
I replaced it with:
protected: Hashtable mHashtable; private:
After that my the only compile error about which I wrote here was fixed. And I applied that fix to Android Photon SDK as well, it gave me the same error when using Clang.
If You have another problems, first test if it can be reproduced in SDK samples like demo_basics, then, if they can, create another thread on this forum. It may help people with the same problem. If You can't reproduce it with SDK samples it's very likely that problem is in Your app code or project settings.
I hope You get it fixed.
The new SDK 4.1.6.0 got released on Friday and fixes this issue.