How to integrate photon sdk with cocos2dx 3.6 and above

I am getting issues saying : missing required architecture x86_64 in file libCommon-cpp_debug_cpp98_iphoneos.a

Comments

  • Hi @DevNeo.

    x86_64 is the architecture that is required for the 64bit iPhone simulator, but you are not linking against a simulator build of the lib, but against an OS build, which is used when running the app on the actual iPhone hardware.
    Please adjust your project to use the iphonesimulator builds of the Photon libs for simulator builds of your app and the iphoneos builds for device builds of your app. Accordingly please also make sure you link against debug builds for debug and against release builds for release versions of your app.

    Furthermore the cpp98 builds are there for use by legacy projects that for some reason still need to use the GCC standard lib and C++ 98 for example because they depend on some outdated versions of 3rd party libraries that can't be updated.
    Any Xcode project that is not somehow forced to use the GCC standard lib and C++ 98, should use the Clang standard lib and C++ 11, which means that it should not use the _cpp98 variants of the Photon libs, but the normal libs (the .a files that do not contain "_cpp98" in their names).

    Please have a look at the demo projects inside the Client SDK. demo_chat, demo_memory and demo_particle all use cocos2d-x (although a rather old version of it) for their graphics, but you could also have look at demo_basics, demo_loadBalancing or demo_typeSupport. All of those 6 show how to setup your project settings correclty so that release, debug, simulator and device builds will all link against the correct versions of the Photon libraries.
  • Undefined symbols for architecture i386:
    "ExitGames::Common::JString::~JString()", referenced from:
    ___cxx_global_var_init.2 in Client.o
    "ExitGames::Common::JString::JString(wchar_t const*)", referenced from:
    ___cxx_global_var_init.2 in Client.o
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)


    Showing Recent Issues
    "ExitGames::Common::JString::~JString()", referenced from:
    ___cxx_global_var_init.2 in Client.o
    "ExitGames::Common::JString::JString(wchar_t const*)", referenced from:
    ___cxx_global_var_init.2 in Client.o

    ld: symbol(s) not found for architecture i386

    clang: error: linker command failed with exit code 1 (use -v to see invocation)


  • Hi @DevNeo.

    Please have a look at the Xcode project and target settings of one of the demos that I have mentioned above and compare them with the ones of your project. This must be caused by one of the differences in those settings between your app and the demos. You just need to track down which difference is causing it.

    I haven't ever heard of this particular error before.
Sign In or Register to comment.