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":

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!

Comments

  • Hi @Dmitry_Stepanushkin.

    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.
  • @Kaiserludi

    Thanks for reply. I'll apply one of my fixes to header.
  • JoshF47JoshF47
    edited April 7

    Hi @Dmitry_Stepanushkin.

    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.

    Hi @Kaiserludi , can someone please provide a fixed header file until this new release is out? I can't publish an important update to my game without being able to compile and test it first on the newer iOS versions.
  • @Kaiserludi

    Thanks for reply. I'll apply one of my fixes to header.

    @Dmitry_Stepanushkin , would you be willing to share what you did to fix this? Everything I try just results in other errors and it will not build.
  • Hi, @JoshF47

    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.
  • Hi @JoshF47, hi @Dmitry_Stepanushkin.

    The new SDK 4.1.6.0 got released on Friday and fixes this issue.
  • Hi @Dmitry_Stepanushkin , thanks for posting that. I actually tried the same thing, and it failed but now I see the failure was actually an XCode 8.3 bug and not directly related. As @Kaiserludi just posted, the new update also fixes this - so thank you both!
Sign In or Register to comment.