Archived

This forum has been archived. Please start a new discussion on GitHub.

Ice Touch 1.3.2 - Glacier2 Compile Errors

Hi,

I'm having some trouble building an application for iOS using Ice touch. Our server side implementation use's a Glacier2 for session management etc.

When using Ice Touch 1.3.2 in xCode I can build the hello sample project, and create simple project of my own which demonstrates basic connectivity directly to server however, I cannot build the chat demo which use's Glacier2.

When compiling the following errors occur:
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GLACIER2RouterPrx", referenced from:
      objc-class-ref in LoginController.o
  "_OBJC_CLASS_$_GLACIER2Session", referenced from:
      objc-class-ref in ChatSession-1BEE047FFCCDE118.o
      objc-class-ref in ChatSession-1BEE047FFCCDE118.o
      objc-class-ref in ChatSession-1BEE047FFCCDE118.o
  "_OBJC_EHTYPE_$_GLACIER2CannotCreateSessionException", referenced from:
      GCC_except_table20 in LoginController.o
  "_OBJC_EHTYPE_$_GLACIER2PermissionDeniedException", referenced from:
      GCC_except_table20 in LoginController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Additionally as soon as I try to use Glacier2 features in my own application I get the same errors.

My understanding is the xCode Ice Touch plugin should load the Glacier libraries automatically? The plugin is otherwise working correctly as it compiles slice etc.

Any help would be much appreciated.

Cheers
Chris

Comments

  • Additional Notes

    Forgot to also mention that when I add -lGlacier2ObjC under other linker flags I receive a different error:
    Ld /Users/chris/Library/Developer/Xcode/DerivedData/demos-dbpvpycjqpgxgkazyjfnwlbzoarz/Build/Products/Debug-iphonesimulator/Chat.app/Chat normal x86_64
        cd /Users/chris/Desktop/IceTouch-1.3.2-demos/iPhone/chat
        export IPHONEOS_DEPLOYMENT_TARGET=5.1.1
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/chris/Library/Developer/Xcode/DerivedData/demos-dbpvpycjqpgxgkazyjfnwlbzoarz/Build/Products/Debug-iphonesimulator -F/Users/chris/Library/Developer/Xcode/DerivedData/demos-dbpvpycjqpgxgkazyjfnwlbzoarz/Build/Products/Debug-iphonesimulator -filelist /Users/chris/Library/Developer/Xcode/DerivedData/demos-dbpvpycjqpgxgkazyjfnwlbzoarz/Build/Intermediates/chat.build/Debug-iphonesimulator/chat.build/Objects-normal/x86_64/Chat.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -lGlacier2ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -ObjC -lstdc++ -stdlib=libstdc++ -lIceObjC -mios-simulator-version-min=5.1.1 -L /Library/Developer/IceTouch-1.3.2/SDKs/ObjC/iphonesimulator.sdk/usr/local/lib -framework Foundation -framework UIKit -framework Security -framework CFNetwork -framework ExternalAccessory -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/chris/Library/Developer/Xcode/DerivedData/demos-dbpvpycjqpgxgkazyjfnwlbzoarz/Build/Intermediates/chat.build/Debug-iphonesimulator/chat.build/Objects-normal/x86_64/Chat_dependency_info.dat -o /Users/chris/Library/Developer/Xcode/DerivedData/demos-dbpvpycjqpgxgkazyjfnwlbzoarz/Build/Products/Debug-iphonesimulator/Chat.app/Chat
    
    duplicate symbol _OBJC_IVAR_$_ChatInvalidMessageException.reason_ in:
        /Users/chris/Library/Developer/Xcode/DerivedData/demos-dbpvpycjqpgxgkazyjfnwlbzoarz/Build/Intermediates/chat.build/Debug-iphonesimulator/chat.build/Objects-normal/x86_64/Chat-8F8566100FD15324.o
    

    Followed by about 15 more duplicate symbols.
  • benoit
    benoit Rennes, France
    Hi

    Which Xcode version do you use? Note that we don't support yet the latest Xcode 6 version (see also the bottom of this thread).

    With the supported Xcode 5.1.1, the chat demo should build fine. You shouldn't have to add the -lGlacier2ObjC library to the linker flags, this is added automatically by the Xcode plugin when the "Link with Ice services client libraries" flag is set to true (which should be the case with the Glacier2 project). You can check your projet to see if this setting is correctly set.

    Cheers,
    Benoit.
  • Hi Benoit

    Thanks for the speedy reply.

    Indeed you've caught me out, I upgraded to th GM of xCode 6 to submit a different app for iOS8.

    I had done all the work arounds to get the plugin working but I cant find anyway around the library linking issue.

    I have got another computer which I have setup with xCode 5 which I will use until the next Ice Touch release.

    Thanks again!