Undefined symbols for architecture i386: "_objc_assign_ivar". Error when open existed Xcode 3 iPhone project in iOS 4 by Xcode 4 - iphone

I have one iPhone project worked fine using Xcode 3. But at that time I opened it by Xcode 4, it raised errors on my first project rebuilding. That error said that:
Undefined symbols for architecture i386:
"_objc_assign_ivar", referenced from:
-[myAppDelegate application:didFinishLaunchingWithOptions:] in myAppDelegate.o
-[myAppDelegate DoAsynchronousCommand:PARAM_ARRAY:Delegate:] in myAppDelegate.o
-[myAppDelegate connection:didReceiveData:] in myAppDelegate.o
-[myAppDelegate connectionDidFinishLoading:] in myAppDelegate.o
etc.
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation).
(Edit: All of necessary libraries were imported and Garbage Collection option was disabled)
I don't know where I have to begin, please show me what wrong? Any help is appreciated. Thanks

Related

iPhone - How to add AdSupport.framework in ios?

I am trying to use the AdMob in my test application when I rum my application i am getting the following error as shown below.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADIdentifierUtilities.o)
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I googled around this errors and everyone telling to add the AdSupport.framework. But when I try to add that framework in my Xcode4.1 and Xcode4.4 there is no AdSupport.framework is not missing. Where can I get it and how to add that framework.
AdSupport.framework available only in iOS6+, so you won't be able to find it in XCode version prior to 4.5
UPD:
According to AdMob 6.2.0 changelog:
Required to use Xcode 4.5 and build against iOS 6. The minimum deployment is iOS 4.3.

Issue in adding google Analytics to iOS

After adding the libGoogleAnalytics.a CFNetwork and libsqlite3.0.dylib frameworks, and added the GANTracker.h into my AppDelegate.m
I get this error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GANTracker", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and the app won't even compile. My app is aimed at iOS 5.0

XCode 4.3.3 sqlite3 error even after importing and including frameworks

When I run my XCode project using sqlite3, I keep getting the same two errors (appearing between **):
Undefined symbols for architecture i386:
**"_OBJC_CLASS_$_CalendarDatabase", referenced from: objc-class-ref in AppDelegate.o**
ld: symbol(s) not found for architecture i386
clang: error: **linker command failed with exit code 1 (use -v to see invocation)**
I looked everywhere for an answer but all I find is problems with importing sqlite3 and including frameworks. But I've included libsqlite3.0.dylib and libsqlite3.dylib and I've imported sqlite3 using #import "sqlite3.h". I'm still getting these errors. What could be the problem?
In the error message, the words for architecture i386 tells me that your dylibs do not have i386 code (only x86_64). If you're compiling for i386 (32 bits), you'll need either fat dylibs (x86_64 + i386), or 32-bit dylibs.

Undefined symbols for architecture i386: "_PerformXMLXPathQuery"

I looked at all the others that had a similar title but none of those solutions worked for some reason... Hoping someone can help!
Undefined symbols for architecture i386:
"_PerformXMLXPathQuery", referenced from:
-[WeatherForecast connectionDidFinishLoading:] in WeatherForecast.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
"_PerformXMLXPathQuery", referenced from:
-[WeatherForecast connectionDidFinishLoading:] in WeatherForecast.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am new to iOS so any help would be greatly appreciated!!
Seems like you are compiling for the simulator (i386) with a library for the Device (ARM). Either compile for the device and run on it or get an i386 version of the library and run with it on the simulator.
For those who need it, the issue was that my XPathQuery.m file was not in the Complied Sources list. It was as simple as that!
Just posting this for future reference! Hope it helps someone!

Why is CoreData not linking in my ported iOS->Mac App?

I'm porting an app from the iOS side to the Mac side and I'm having an annoying linking error where the linker appears to be trying to use the iOS version of the coredata framework instead of the (x86_64) one. I've deleted the framework and re-added it and know I'm adding the mac version. I've also regenerated my model classes. I'm getting this error:
ld: warning: ignoring file /Users/xxxxx/xcode_projects/xxxxx/CoreData.framework/CoreData, file was built for unsupported file format which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"_NSSQLiteStoreType", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_NSInferMappingModelAutomaticallyOption", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_NSMigratePersistentStoresAutomaticallyOption", referenced from:
-[CoreDataSingleton persistentStoreCoordinator] in CoreDataSingleton.o
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in CoreDataSingleton.o
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in CoreDataSingleton.o
etc...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions would be helpful, thanks,
Nick
Link errors usually mean you aren't including a framework in the project.
In the "Link Binary With Libraries" section of the "Build Phases" tab of the build settings for your project, make sure CoreData.framework is listed. If not, press the "+" button and select it.