Link error in Xcode for Cloud ObjC version

edited August 2012 in Native

I feel it's a stupid question, but I need your help. Tried to compile my game prototype for Xcode with Cloud Photon, followed instructions in the manual and then got the following link error:

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_PhotonPeer", referenced from:
objc-class-ref in MainLayer.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status

What I did wrong? Linking flags and library paths specified as required.

BTW, I'm producer of such games as Vogue Tales, Wonderburg and others looking for some help for my new project (2D mobile single/multiplayer action RPG) on permanent basis. If you're willing to help in such a venture, let me know! Not for free, of course.



  • Hi Michael.
    Which version of the SDK are you using?
    Have you checked, that the demos run fine on you computer?
    If so, please doublecheck for any differences to your project in terms of settings.
  • Thanks for reply. Double checked everything. I use latest SDK version (downloaded yesterday) and latest Xcode/iOS SDK. When trying to manually add libs for Common and Photon into the project (just to check) for the same build target (i.e. iphone debug), I have different errors appeared (misc text skipped).

    Undefined symbols for architecture armv7:
    "operator new(unsigned long)", referenced from:
    "std::terminate()", referenced from:
    "operator delete(void*)", referenced from:
    "___gxx_personality_sj0", referenced from:
    "vtable for __cxxabiv1::__si_class_type_info", referenced from:
    "___cxa_pure_virtual", referenced from:
    "operator new[](unsigned long)", referenced from:
    "operator delete[](void*)", referenced from:
    "vtable for __cxxabiv1::__class_type_info", referenced from:

    BTW, there're no samples in iOS version of SDK except for LoadBalancing (which doesn't use PhotonPeer, only NetworkLogic). Are there any plans to add working samples to the SDK?
  • Well, these erors pretty much look like you have not added -lstdc++ to other linker flags, like it is described in the docs pdf.
    What do you mean with manually vs. non-manually adding the libs?

    There just is the LoadBalancing demo in the cloud SDK, because to use the cloud you need to use a LoadBalancing comaptible client. You can in theory also do that with a pure PhotonPeer, but you would pretty much ahve to reinvent everything, what the client side LoadBalancing APi is already doing for you.
    The NetworkLogic class in the LoadBalancing demo uses class LoadBalancingClient, which is inheriting from LoadBalancingPeer and the latter one is inheriting from PhotonPeer.
  • Thanks for this clarification. Strange, but I'm using -lstdc++ already with other linker flags. Will keep digging.
    Fun that there's no word about LoadBalancingClient in the manuals from Cloud SDK.
  • Sorry, the LoadBalancing docs are still in work.
  • So, when will the LoadBalancing docs be finished?
  • We are targeting this autumn.
Sign In or Register to comment.