Application Tool Kit

iOS ATK 2.2.0 Link Error: duplicate symbol _kReachabilityChangedNotification

duplicate symbol _kReachabilityChangedNotification in:

/Users/xxx/Developer/MyScriptATK/Frameworks/ATKCore.framework/ATKCore(COREReachability.o)

I noticed that you guys add "CORE" as prefix to Reachability to avoid symbol conflict, however change class name is not enough, you should also change enum and const.

Please fix this. Thx



1 person has this question

Dear Lan,


thank you for contacting us.


Such issue usually occurs when the link flags are not properly set.


Can you please check you set theass ones:

OTHER_LDFLAGS = (
           "-ObjC",
           "-lstdc++",
         );


Best regards,


Olivier

I've checked in other linker flags, it set as "-licucore -ObjC -lstdc++".

I still got the duplicate symbol error,

FYI, I use Reachability via CocoaPods.


duplicate symbol _kReachabilityChangedNotification in:

    /Users/xxx/Library/Developer/Xcode/DerivedData/App-ccqcbnncfrapnmgmmnjrqphbrqtf/Build/Products/Debug-iphonesimulator/ASI-Reachability/libASI-Reachability.a(Reachability.o)

    /Users/xxx/Developer/project-ios/Vendor/MyScript/Frameworks/ATKCore.framework/ATKCore(COREReachability.o)

ld: 1 duplicate symbol for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

FYI, 

Because I use CocoaPods, I found that Pods also add these items to other linker flags:

-l"c" -l"c++" -l"stdc++" -l "stdc++.6.0.9"

Dear Lan Chenyu,


can you please provide with the list of all flags you are using?


Best regards,


Olivier

Hi, I'm getting the same error. I also use Reachability but not CocoaPods. My flags are set the same as his,

"-licucore -ObjC -lstdc++"

Thanks.



Dear Sir,


are you setting other flags, or only these?


Best regards,


Olivier

Yes. To clarify, I started getting the error when trying to integrate the ATK frameworks into an app that imports "Reachability.h".

Edit: I mean yes only "-licucore -ObjC -lstdc++".

After checking internally, at present we have no way to go around this behavior.


We can not commit if/when an update will be done.


Best regards,


Olivier

Login or Signup to post a comment