Photon Unreal Engine SDK Compile Error

Hello
I try to compile photon sample for UE4 .but stick to Errors. my original error is "Cannot instantiate abstract class". but i think errors come from window header files.
I using Visual Studio 2015 Enterprise Edition and UE4.14 and i following the tutorials from YouTube.


VS Output:
2>c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(109): warning C4264: 'void ExitGames::LoadBalancing::Listener::connectReturn(int,const ExitGames::Common::JString &,const ExitGames::Common::JString &)': no override available for virtual member function from base 'ExitGames::LoadBalancing::Listener'; function is hidden
2> C:\PhotonDemoParticle-UE4\Source\Photon\LoadBalancing-cpp/inc/Listener.h(40): note: see declaration of 'ExitGames::LoadBalancing::Listener::connectReturn'
2> C:\PhotonDemoParticle-UE4\Source\Photon\LoadBalancing-cpp/inc/Listener.h(19): note: see declaration of 'ExitGames::LoadBalancing::Listener'
2>c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(27): warning C4458: declaration of 'lbc' hides class member
2> c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(18): note: see declaration of 'LoadBalancingListener::lbc'
2>C:\PhotonDemoParticle-UE4\Source\PhotonDemoParticle\demo_particle_common\LoadBalancingListener.cpp(221): warning C4458: declaration of 'localPlayerNr' hides class member
2> c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(61): note: see declaration of 'LoadBalancingListener::localPlayerNr'
2>C:\PhotonDemoParticle-UE4\Source\PhotonDemoParticle\demo_particle_common\LoadBalancingListener.cpp(233): warning C4458: declaration of 'localPlayerNr' hides class member
2> c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(61): note: see declaration of 'LoadBalancingListener::localPlayerNr'
2>C:\PhotonDemoParticle-UE4\Source\PhotonDemoParticle\demo_particle_common\LoadBalancingListener.cpp(245): warning C4458: declaration of 'localPlayerNr' hides class member
2> c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(61): note: see declaration of 'LoadBalancingListener::localPlayerNr'
2>C:\PhotonDemoParticle-UE4\Source\PhotonDemoParticle\demo_particle_common\LoadBalancingListener.cpp(257): warning C4458: declaration of 'localPlayerNr' hides class member
2> c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(61): note: see declaration of 'LoadBalancingListener::localPlayerNr'
2>C:\PhotonDemoParticle-UE4\Source\PhotonDemoParticle\demo_particle_common\LoadBalancingListener.cpp(333): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2> C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(119): note: see declaration of 'strcpy'
2>C:\PhotonDemoParticle-UE4\Source\PhotonDemoParticle\demo_particle_common\LoadBalancingListener.cpp(374): warning C4458: declaration of 'localPlayerNr' hides class member
2> c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(61): note: see declaration of 'LoadBalancingListener::localPlayerNr'
2>C:\PhotonDemoParticle-UE4\Source\PhotonDemoParticle\demo_particle_common\LoadBalancingListener.cpp(400): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
2> C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(1769): note: see declaration of 'sprintf'
2>ERROR : UBT error : Failed to produce item: C:\PhotonDemoParticle-UE4\Binaries\Win64\UE4Editor-PhotonDemoParticle.dll
2> Total build time: 7.51 seconds
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command "D:\UnrealEngine4.14.1\Engine\Build\BatchFiles\Build.bat PhotonDemoParticleEditor Win64 Development "C:\PhotonDemoParticle-UE4\PhotonDemoParticle.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
========== Build: 1 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

Comments

  • please, can someone help me.
    ...
    .
    .
  • Kaiserludi
    Kaiserludi admin
    edited January 2017
    Hi @sepinoodGameStudio.

    Please be patient.
    You have asked you question yesterday, which was a Sunday, but we only respond to forum threads on work days.

    Please check out our Unreal Engine Get Started guide at https://doc.photonengine.com/en/onpremise/current/getting-started/unreal-engine and the demo project for UE that is linked on that page.

    If you still have questions afterwards, please say so.

    Regarding the error message that you have posted:

    2>c:\photondemoparticle-ue4\source\photondemoparticle\demo_particle_common\LoadBalancingListener.h(109): warning C4264: 'void ExitGames::LoadBalancing::Listener::connectReturn(int,const ExitGames::Common::JString &,const ExitGames::Common::JString &)': no override available for virtual member function from base 'ExitGames::LoadBalancing::Listener'; function is hidden 2> C:\PhotonDemoParticle-UE4\Source\Photon\LoadBalancing-cpp/inc/Listener.h(40): note: see declaration of 'ExitGames::LoadBalancing::Listener::connectReturn' 2> C:\PhotonDemoParticle-UE4\Source\Photon\LoadBalancing-cpp/inc/Listener.h(19): note: see declaration of 'ExitGames::LoadBalancing::Listener'
    It looks like the Listener implementation in the currently available version of the demo is slightly outdated and its signature for connectReturn() does not match the one in the Listener interface.

    Please replace the signature of LoadBalancingListener::connectReturn() in LoadBalancingListener.h and LoadBalancingListener.cpp with the one from Listener::connectReturn() from LoadBalancing-cpp/inc/Listener.h (the one from Listener.h has an additional parameter that you need to add to the one in class LoadBalancingListener).
    We will update the demo package in our download section accordingly.

    EDIT:
    The demo hay been updated, now.
  • tnx for solution,
    i download the new version of Demo,Now i get this error
    2>LINK : fatal error LNK1181: cannot open input file 'C:\PhotonDemoParticle-UE4\Source\Photon\lib\Windows\Common-cpp_vc14_release_windows_md_x64.lib'

    i want to release for Android platform.do i need copy this file "Common-cpp_vc14_release_windows_md_x64.lib" from photonsdk Windows to my project?
  • Kaiserludi
    Kaiserludi admin
    edited January 2017
    Hi @sepinoodGameStudio.

    Well, if you don't want to release on Windows, then you would not need that lib for your final build, but keep in mind that you need to develop somewhere. So, it makes sense to also have Photon binaries for the OS on which you are working on your Unreal Engine project, so either Windows or OS X or otherwise you could only run and debug the game on Android.
  • After successfully compile photon for UE4Now I'm stuck on error1040.
    according to this thread http://forum.photonengine.com/discussion/comment/20683#Comment_20683
    i setup the photonSDK to test successful connection,work fine.
    i change the all Region with this name server in ue4 editor ns.exitgamescloud.com.
    also test the name server with WinMRT.

    and,...now please advise me the best solution :'(





  • Hi @sepinoodGameStudio.

    I am not sure if I understand you correctly.

    "i setup the photonSDK to test successful connection,work fine."
    What exactly connects fine?
    A demo from one of our the C++ Client SDKs that does not use Unreal Engine?
    Or our demo for Unreal Engine?

    For what do you get the 1040 error?
    For our Unreal demo or for your own app?

    Are the client that connects and the one that doesn't running on the same device or on different devices?
  • 1-setup the photonSDK to test successful connection,work fine:
    according to this thread http://forum.photonengine.com/discussion/comment/20683#Comment_20683
    to make sure my global ip work fine.

    2:I've get error 1040 in UE4 editor(UE4 Demo) and even in the Build version with the same reason.
    sepinoodstudio.com/error1040_01.gif
    sepinoodstudio.com/error1040_02.gif

    3:i just Build the Windows version of photon.
  • Hi @sepinoodGameStudio.

    When I unzip the demo project and build it, all I have to do is replacing the entry in the App ID field with an actual app ID in the editor. After that I just click the play button and the demo happily connects.

    So the only reason that I can see why you might get a 1040 error is that a firewall or router blocks your traffic.

    Are you by any chance located inside China?
    China blocks traffic to ns-exitgames.com, as that address s not located inside China itself.
    So clients that are running inside China need to connect to "ns-cn.exitgames.com" instead (attention: clients located outside of China can't reach that address and therefor should not use it).
    Note that the China region is currently only available for developers who explicitly requested so. See https://doc.photonengine.com/en-us/realtime/current/reference/regions#using_the_chinese_mainland_region for how to do that.

    I don't have any idea, what the forum thread that you linked has to do with your issue. The only time that the author of that post did get a 1040 error was when he tried to use an invalid server address and port combination by trying to connect to ns.exitgames.com:5055. This is expected to result in a 1040 error and should not be done.
    When connecting to Photon Cloud, you should not specify any port for the name server address at all, so that the client will choose the default port for Photon name servers, which is 5058 for UDP and which is the correct port for the Photon Cloud nameservers ns.exitgames.com and ns-cn.exitgames.com.
  • I'm dying on error 1040 :'(
    i don't know how to solve this error.i spend last 3 days for checking this error, every time on even different PC.
    please.advise....
  • Hi @sepinoodGameStudio.

    Have you tried it from a different network or are all clients that you have tried on in the same local network?

    In which country are you located?

    Due to Softlayers IP-blocking, which is affecting Photon Cloud

    SoftLayer implements network-wide blocking of IP addresses that originate from countries that are subject to U.S. trade and economic sanctions. Currently, these countries are Cuba, Iran, North Korea, Sudan, and Syria.

    https://knowledgelayer.softlayer.com/faq/softlayer-network-wide-ip-blocking

    Photon Cloud is not reachable from Cuba, Iran, North Korea, Sudan and Syria.

    If you are located within one of these countries, then you will need to use a self hosted Photon Server instance instead of Photon Cloud for local development. Those of your customers who are located outside of the listed countries could still use Photon Cloud (before a release it of course makes sense to ask someone outside of these countries to test your game with Photon Cloud).