aliessmael / Unity-Contacts-List

Unity Contacts List is a unity3d plugin for Android and iOS devices that enable you to access to contacts. Retreive names, phone numbers, and even photos.
42 stars 20 forks source link

Duplicate Symbols error on Xcode after adding another plugin #2

Closed felipemanera closed 8 years ago

felipemanera commented 8 years ago

Hi, this plugin was working fine for me until I added a Facebook SDK integration to my project and then when I try to build the project on Xcode the following error occur:

duplicate symbol __Z14MakeStringCopyPKc in: /Users/felipemanera/Library/Developer/Xcode/DerivedData/Unity-iPhone-hhfeqqxvvalkykersdyfjquszqwo/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/Contacts.o /Users/felipemanera/Library/Developer/Xcode/DerivedData/Unity-iPhone-hhfeqqxvvalkykersdyfjquszqwo/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/FBUnityUtility.o ld: 1 duplicate symbol for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm guessing the Facebook plugin also declared "MakeStringCopy" on their code and that's whats causing the issue. Can you help me figuring out how to work around this issue?

Thanks

felipemanera commented 8 years ago

For those having the same issue, just edit one of the files from the error log (on my case I edited FBUnityUtility.mm - and yes, it has to be the .mm extension one) and rename the "MakeStringCopy" function to something else. And don't forgot to rename the references to it as well.

It's working again now.

aliessmael commented 8 years ago

I will rename "MakeStringCopy" to something else next release

felipemanera commented 8 years ago

Yes that will be good. Thanks.

aliessmael commented 8 years ago

Done