hy all,
I am building an application to create a simple tableview, with a search bar on top to search between the elements of the table.
I have followed a tutorial and no coding errors were found, but when building, it always fails showing the following message:
Ld /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator/ERCDictionnary.app/ERCDictionnary normal i386
cd /Users/gouyoun/Desktop/ERCDictionnary/ERCDictionnary
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator -F/Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator -filelist /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Intermediates/ERCDictionnary.build/Debug-iphonesimulator/ERCDictionnary.build/Objects-normal/i386/ERCDictionnary.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator/ERCDictionnary.app/ERCDictionnary
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_OverlayViewController", referenced from:
objc-class-ref in tableView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
"_OBJC_CLASS_$_OverlayViewController", referenced from:
objc-class-ref in tableView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm a newb in OBjective C, any ideas?
Your tableView class refers to a class called OverlayViewController which is not in your project.
Its done, it only needed to remove the files and re-add them later, it worked like a charm
I've had the exact same error. It occured because I had 2 xCode Projects open, an Dragged & Dropped a class from one project to the other one. I checked "Copy to project" and the files where in the new projects folder. But it crashed every time.
I deleted the classes and IMPORTED them into the project and then it worked... So be careful when using Drag'n'Drop!
Related
I know this type of error has been raised many times before, but I have not found solution of my error. I am using xcode 4.0. I downloaded ASIHTTPRequest zip and copied classes folder along with two files of 'Reachability". After compilation, it is giving me strange errors which I can't figure out. Below I copied text of error for undefined symbols for architecture i386.
Ld /Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesimulator/Manual.app/Manual normal i386
cd "/Users/svp/Desktop/Manual nav before pres 2"
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/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesimulator -F/Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesimulator -filelist /Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Intermediates/Manual_BeforePres2.build/Debug-iphonesimulator/Manual.build/Objects-normal/i386/Manual.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lz -framework SystemConfiguration -framework CFNetwork -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/svp/Library/Developer/Xcode/DerivedData/Manual_BeforePres2-fahkeiivemkgpubswgvzglvndszw/Build/Products/Debug-iphonesimulator/Manual.app/Manual
Undefined symbols for architecture i386:
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
"_UTTypeCopyPreferredTagWithClass", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
"_kUTTagClassFilenameExtension", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
"_kUTTagClassMIMEType", referenced from:
+[ASIHTTPRequest mimeTypeForFileAtPath:] in ASIHTTPRequest.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Also it is giving me a warning in ASIAuthenticationDialog.m file:
ASIAuthenticationDialog may not respond to _presentingViewController
Please anyone tell me what are these errors and warning for? What am I doing wrong? I have wasted many hours over it :(
EDIT:
Code for warning in ASIAuthenticationDialog.m file:
#import "ASIAuthenticationDialog.h"
#import "ASIHTTPRequest.h"
#pragma mark show / dismiss
+ (void)dismiss
{
if ([sharedDialog respondsToSelector:#selector(presentingViewController)])
[[sharedDialog presentingViewController] dismissModalViewControllerAnimated:YES];
else
[[sharedDialog parentViewController] dismissModalViewControllerAnimated:YES];
}
If you were to look up the missing symbols in the documentation, you would find them listed along with the framework where they are located. For example, UTTypeCreatePreferredIdentifierForTag says it is located in the MobileCoreServices.framework. (The others may be there too; I didn't look for all of them.) Add the necessary framework(s) to the link library step of your target's build phases and the symbols should be resolved.
As for the warning, please show the code where it's happening.
I am trying to compile a project using the ASIHTTPREQUEST library.
I followed the directions and linked to all the necessary libraries, and I get no errors that are not compile errors... I am allowed to try to compile the project.
The problems only arise when I try to use this code in my .m
NSURL *colorURL = [NSURL URLWithString:#"http://www.colourlovers.com/api/colors?format=json"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:colorURL];
[request setDelegate:self];
[request startAsynchronous];
from this tutorial:
http://ios-blog.co.uk/tutorials/parsing-json-on-ios-with-asihttprequest-and-sbjson/
Ld /Users/johndoe/Library/Developer/Xcode/DerivedData/round5-bdubuaqrmfeeujdoabfnpkzsctpa/Build/Products/Debug-iphonesimulator/round5.app/round5 normal i386
cd /Users/johndoe/Documents/apps/iphone/corelocationtest/round5
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/johndoe/Library/Developer/Xcode/DerivedData/round5-bdubuaqrmfeeujdoabfnpkzsctpa/Build/Products/Debug-iphonesimulator -F/Users/johndoe/Library/Developer/Xcode/DerivedData/round5-bdubuaqrmfeeujdoabfnpkzsctpa/Build/Products/Debug-iphonesimulator -filelist /Users/johndoe/Library/Developer/Xcode/DerivedData/round5-bdubuaqrmfeeujdoabfnpkzsctpa/Build/Intermediates/round5.build/Debug-iphonesimulator/round5.build/Objects-normal/i386/round5.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -lz -framework CFNetwork -framework SystemConfiguration -framework MobileCoreServices -framework CoreLocation -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/johndoe/Library/Developer/Xcode/DerivedData/round5-bdubuaqrmfeeujdoabfnpkzsctpa/Build/Products/Debug-iphonesimulator/round5.app/round5
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIHTTPRequest", referenced from:
objc-class-ref in round5ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I don't understand what this error means:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIHTTPRequest", referenced from:
objc-class-ref in round5ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Really lost... please help!!
PS: I looked at some other threads on stack overflow but they don't reference to the same error.
never mind!!!
duplicate:
Error with iOS 5.1 when i use ASIHTTPRequest and SBJSON
"I would take a look at the Build Phases section in your Target. Under "Compile Sources", make sure you see the .m files for ASIHTTPRequest and for SBJson. Sometimes when you drag external classes into a project, even if you check the box to copy the files into your project, they don't make it into these compile sources. When you drag a file into Xcode, there is a check box to add the file to the target. If this isn't checked, the file won't make it into the Compile Sources. Delete the files and re-add them, ensuring this file is checked (or you can add the .m files manually if you'd like)."
by jmstone
I have no experience at all at objective-c, only now started.
A developer I work with had to go abroad for a few days, and by mistake left an error in the code, and now I cannot compile an Iphone application to finish it...
I got some information from him by mail, and he told me that he left a library that is called dialog and that I need to remove it to make it work...
The thing is that I have no experience in objective-c and Xcode... i'm the web developer :)
i tried to run the project, and got this error:
Build target mormar
Ld
/Users/yanivshimony/Library/Developer/Xcode/DerivedData/mormar-cxfykryhzfovlbgtsjfowgleiyxu/Build/Products/Debug-iphonesimulator/mormar.app/mormar
normal i386
cd /Users/yanivshimony/Desktop/mormar
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
-L/Users/yanivshimony/Library/Developer/Xcode/DerivedData/mormar-cxfykryhzfovlbgtsjfowgleiyxu/Build/Products/Debug-iphonesimulator
-F/Users/yanivshimony/Library/Developer/Xcode/DerivedData/mormar-cxfykryhzfovlbgtsjfowgleiyxu/Build/Products/Debug-iphonesimulator
-filelist /Users/yanivshimony/Library/Developer/Xcode/DerivedData/mormar-cxfykryhzfovlbgtsjfowgleiyxu/Build/Intermediates/mormar.build/Debug-iphonesimulator/mormar.build/Objects-normal/i386/mormar.LinkFileList
-mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -framework UIKit -framework Foundation -framework CoreGraphics -o
/Users/yanivshimony/Library/Developer/Xcode/DerivedData/mormar-cxfykryhzfovlbgtsjfowgleiyxu/Build/Products/Debug-iphonesimulator/mormar.app/mormar
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CATransition", referenced from:
objc-class-ref in LoadingView.o "_kCATransitionFade", referenced from:
+[LoadingView loadingViewInView:] in LoadingView.o
-[LoadingView removeView] in LoadingView.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with
exit code 1 (use -v to see invocation)
after googling this for a while, I still have no idea how to solve this...
I would greatly appreciate any help,
thanks!
You need to link against QuartzCore.
Click on your project name in the Xcode sidebar. Then click on your target, and in the Summary tab find the list of linked frameworks and libraries. Click the plus button below this list, and add QuartzCore.
You need QuartzCore framework. Add it to your project (through project setting's "Link binary" build phase). Add the #import <QuartzCore/QuartzCore.h> to project's prefix header (usually Prefix.pch or {ProjectName}-Prefix.pch). This should solve the problem without removal of this library.
I'm trying to build the DisposeWindow+Beep_Injector example project here: https://github.com/rentzsch/mach_star and am having trouble getting the framework it comes bundled with(mach_inject_bundle) linked to the application project correctly.
Here's the error I get:
Ld build/Development/DisposeWindow+Beep.bundle/Contents/MacOS/DisposeWindow+Beep normal x86_64
cd /Users/me/repos/mach_star/DisposeWindow+Beep
/Developer/usr/bin/llvm-gcc-4.2 -arch x86_64 -bundle -L/Users/me/repos/mach_star/DisposeWindow+Beep/build/Development -F/Users/me/repos/mach_star/DisposeWindow+Beep/build/Development -filelist /Users/me/repos/mach_star/DisposeWindow+Beep/build/DisposeWindow+Beep.build/Development/DisposeWindow+Beep.build/Objects-normal/x86_64/DisposeWindow+Beep.LinkFileList -framework Carbon -framework AudioToolbox -o /Users/me/repos/mach_star/DisposeWindow+Beep/build/Development/DisposeWindow+Beep.bundle/Contents/MacOS/DisposeWindow+Beep
Undefined symbols for architecture x86_64:
"_mach_override", referenced from:
_load in DisposeWindow+Beep.o
(maybe you meant: _mach_override_ptr)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
All the individual projects build fine but I can't build the parent project...
Here's a screenshot of what all the configs look like: http://i.imgur.com/vaLTu.png
Any ideas?
There is no mach_override, there is only a mach_override_ptr. You have to use that function.
I am using CLLocationManager.
I got this compile error:
Ld /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/BadgerNew.app/BadgerNew normal i386
cd /Users/Teguh/Dropbox/badgers/BadgerNew
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-g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator -F/Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator -filelist /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Intermediates/BadgerNew.build/Debug-iphonesimulator/BadgerNew.build/Objects-normal/i386/BadgerNew.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -o /Users/Teguh/Library/Developer/Xcode/DerivedData/BadgerNew-bjopcgcgsjkcvcevflfbvsjwfgnu/Build/Products/Debug-iphonesimulator/BadgerNew.app/BadgerNew
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CLLocationManager", referenced from:
objc-class-ref in UtilitiesQuick.o
"_kCLLocationAccuracyBest", referenced from:
-[BNUtilitiesQuick init] in UtilitiesQuick.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
So how am I supposed to program CLLocationmanager? I mean does that mean location manager is not available on iMac?
You need to add CoreLocation.framework to your project.
I got the same issue.. after a long struggle I found the issue..
I resolved it this way..
Go to Build Settings
Search for 'framework search path'
And delete the pre filled path.
Now it works perfectly.. I have given the answer in this question.. hope it helps some one..