Archived

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

XCode 5.1 and duplicate symbol

Hi,

I recently updated my Xcode version to 5.1; since then, I am not be abled to compile my old application anymore.

I already updated the IceTouch version (1.3.2), so the Xcode plugin is properly installed. I've not modified the project file configuration, it is the same it was before updating to Xcode 5.1. When I try to compile, the linker gives me a lot of errors about duplicate symbols:
...

duplicate symbol _OBJC_IVAR_$_GLACIER2PermissionDeniedException.reason_ in:
    /Library/Developer/IceTouch-1.3.2/SDKs/ObjC/iphonesimulator.sdk/usr/local/lib/libGlacier2ObjC.a(PermissionsVerifier.o)
    /Library/Developer/IceTouch-1.3.2/SDKs/ObjC/iphonesimulator.sdk/usr/local/lib/libGlacier2ObjC-libc++.a(PermissionsVerifier.o)
duplicate symbol _OBJC_IVAR_$_GLACIER2PermissionDeniedException.slicedData__ in:
    /Library/Developer/IceTouch-1.3.2/SDKs/ObjC/iphonesimulator.sdk/usr/local/lib/libGlacier2ObjC.a(PermissionsVerifier.o)
    /Library/Developer/IceTouch-1.3.2/SDKs/ObjC/iphonesimulator.sdk/usr/local/lib/libGlacier2ObjC-libc++.a(PermissionsVerifier.o)

...

ld: 92 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems the plugin is importing both the C and C++ library, so many symbols are duplicated.

Do you know how to solve it?

Thank you

Comments

  • xdm
    xdm La Coruña, Spain
    Hi,

    Seems to me that you have set "-lGlacier2ObjC" in the project "Other Linker Flags" you need to remove that, the Xcode plug-in will link with the right service libraries depending of the C++ run-time library used by the project.

    Both are C++ libraries the ones with c++ suffix use "libc++" C++ runtime library, and the others use libstdc++ runtime.
  • Thank you very much, it worked.

    I guess I enabled this flag to compile properly in previous verisons.