Home Help Center

XCode 5.1 and duplicate symbol

jmsanchezjmsanchez Member Jose Manuel Sanchez Matamoros PerezOrganization: ZennioProject: home automation system remote controller
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

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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.
  • jmsanchezjmsanchez Member Jose Manuel Sanchez Matamoros PerezOrganization: ZennioProject: home automation system remote controller
    Thank you very much, it worked.

    I guess I enabled this flag to compile properly in previous verisons.
Sign In or Register to comment.