Reachability conflct

730 views
Skip to first unread message

PeterD

unread,
Dec 24, 2010, 6:57:06 AM12/24/10
to ASIHTTPRequest
Hello,

I am trying to use ASIHHTPRequest in an iPhone project that already
includes the ShareKit library (http://www.getsharekit.com/).

Both use the Reachability class, and compilation produces a conflict
error:

ld: duplicate symbol _OBJC_IVAR_$_Reachability.reachabilityRef in /
Users/peter/programming-MacBookPro/iPhone/iDrinks/build/iDrinks.build/
Debug-iphonesimulator/iDrinks.build/Objects-normal/i386/Reachability-
B759802E51CD7CAB.o and /Users/peter/programming-MacBookPro/iPhone/
iDrinks/build/iDrinks.build/Debug-iphonesimulator/iDrinks.build/
Objects-normal/i386/Reachability-37ECFA3F1D66F63.o

Any suggestions as to how I can resolve this conflict?

Thanks!

Thomas Weisbach

unread,
Dec 24, 2010, 7:19:13 AM12/24/10
to asihttp...@googlegroups.com
How about just removing the Reachability files from ASIHttpRequest from your project?

One problem that might arise is if the version of Reachability used by ShareKit is significantly different from that used by ASIHttpRequest.

> --
> You received this message because you are subscribed to the Google Groups "ASIHTTPRequest" group.
> To post to this group, send email to asihttp...@googlegroups.com.
> To unsubscribe from this group, send email to asihttpreques...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/asihttprequest?hl=en.
>

PeterD

unread,
Dec 24, 2010, 6:07:15 PM12/24/10
to ASIHTTPRequest
ShareKit uses Reachability version 2.1, whereas ASIHttpRequest uses
version 2.0.4ddg.

When I remove reachability.h and .m from ASIHttpRequest, I get a new
error:

"_kReachabilityChangedNotification", referenced from:
_kReachabilityChangedNotification$non_lazy_ptr in
ASIHTTPRequest.o
(maybe you meant: _kReachabilityChangedNotification$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status

I suppose ASIHttpRequest is looking for its own version of
Reachability?


On Dec 24, 11:19 pm, Thomas Weisbach <thomas.weisb...@atlantiss.jp>
wrote:

Peter Dalmaris

unread,
Dec 24, 2010, 9:30:42 PM12/24/10
to ASIHTTPRequest
I removed Reachability from ShareKit, and that worked. Thanks for the
suggestion Thomas.

On Dec 24, 11:19 pm, Thomas Weisbach <thomas.weisb...@atlantiss.jp>
wrote:

Andrew W. Donoho

unread,
Dec 24, 2010, 10:48:22 PM12/24/10
to asihttp...@googlegroups.com

On Dec 24, 2010, at 17:07 , PeterD wrote:

ShareKit uses Reachability version 2.1, whereas ASIHttpRequest uses
version 2.0.4ddg.

When I remove reachability.h and .m from ASIHttpRequest, I get a new
error:

 "_kReachabilityChangedNotification", referenced from:
     _kReachabilityChangedNotification$non_lazy_ptr in
ASIHTTPRequest.o
    (maybe you meant: _kReachabilityChangedNotification$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status

I suppose ASIHttpRequest is looking for its own version of
Reachability?




As the author of the 2.0.4ddg Reachability, I can probably shed some light on this issue. Both versions of Reachability are call for call compatible with Apple Reachability v2.0. v2.0.4ddg also has a few more convenience functions and supports iOS v2. (Plus, I answer support queries.)


The problem with the missing symbol is in ASIHTTP and was resolved by Ben several months ago. I recommend that you upgrade your ASIHTTP and then you can pick the Reachability you want.

Anon,
Andrew
____________________________________
Andrew W. Donoho
Donoho Design Group, L.L.C.

"When you can't imagine how things are going to change, 
    that doesn't mean that nothing will change.
        It means that things will change in ways that are unimaginable."
            Bruce Sterling, January 02, 2009






Reply all
Reply to author
Forward
0 new messages