iphone - Apple Mach-O Linker (Id) error -
got error first time, have looked around , cannot find solution me, have cleaned build , checked make sure compiling latest firmware.
this happened after tired implementing reachability solution found on here imported 2 reachability files (.m/.h) added code .m file , delared t in . h of reachability files
-(bool)reachable { reachability*r =[reachability reachabilitywithhostname:@"enbr.co.cc"]; networkstatus internetstatus =[r currentreachabilitystatus]; if(internetstatus ==notreachable){ return no; } return yes;}
after called function both of viwcontrollers viewwillappear methods so..
- (void)viewwillappear:(bool)animated { [super viewwillappear:animated]; //-- check reachability start ----> reachability *reach = [[reachability alloc] init]; if ([reach reachable]) { nslog(@"reachable"); } else { nslog(@"not reachable"); } //-- check reachability end ----> }
no errors produced untill tried build , run in simulator. error received :(
ld /users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/products/debug-iphonesimulator/wizcode.app/wizcode normal i386 cd "/users/imac/documents/iphone applications/wizsancode/wizsancode.5/wizcode" setenv macosx_deployment_target 10.6 setenv path "/developer/platforms/iphonesimulator.platform/developer/usr/bin:/developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/developer/platforms/iphonesimulator.platform/developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator4.3.sdk -l/users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/products/debug-iphonesimulator -f/users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/products/debug-iphonesimulator -filelist /users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/intermediates/wizcode.build/debug-iphonesimulator/wizcode.build/objects-normal/i386/wizcode.linkfilelist -mmacosx-version-min=10.6 -xlinker -objc_abi_version -xlinker 2 -lz -framework coregraphics -framework mobilecoreservices -framework systemconfiguration -framework cfnetwork -framework uikit -framework foundation -o /users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/products/debug-iphonesimulator/wizcode.app/wizcode
ld: duplicate symbol _objc_ivar_$_reachability.reachabilityref in /users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/intermediates/wizcode.build/debug-iphonesimulator/wizcode.build/objects-normal/i386/reachability-183e2d17a6b26176.o , /users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/intermediates/wizcode.build/debug-iphonesimulator/wizcode.build/objects-normal/i386/reachability-183e2d17a6b26176.o architecture i386 collect2: ld returned 1 exit status command /developer/platforms/iphonesimulator.platform/developer/usr/bin/llvm-gcc-4.2 failed exit code 1 ld: duplicate symbol _objc_ivar_$_reachability.reachabilityref in /users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/intermediates/wizcode.build/debug-iphonesimulator/wizcode.build/objects-normal/i386/reachability-183e2d17a6b26176.o , /users/imac/library/developer/xcode/deriveddata/wizcode-ccyrqptvfsabmbahgxartbvxwurq/build/intermediates/wizcode.build/debug-iphonesimulator/wizcode.build/objects-normal/i386/reachability-183e2d17a6b26176.o architecture i386
command /developer/platforms/iphonesimulator.platform/developer/usr/bin/llvm-gcc-4.2 failed exit code 1
so, problem has been resolved.
what happened when imported reachability files on build funny happening , somehow deleted reachability files in build being used "all seeing i" asihttprequest methods using transporting data... messed up.
so long story short replaced files , working fine , found out asihttptequest taking care of reachability me :) how cool that.
Comments
Post a Comment