Undefined symbols for architecture i386 - iphone

I have downloaded the SDL Library, i created an Xcode project, but when i try to build the xcode return this error:
Undefined symbols for architecture i386:
"_SDL_CreateMutex", referenced from:
-[testViewController packet_queue_init:] in testViewController.o
"_SDL_CreateCond", referenced from:
-[testViewController packet_queue_init:] in testViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
how can i fix it??
thanks

Keeps happening to me randomly too. Assuming you're still using your project, just try to toggle the options for the following settings :
Build active architecture only (DEBUG is usually YES, RELEASE is usually NO).
SDK : Latest
Build target: iPhone OS 4.0 (Or whatever your min supported OS is)

Related

error on AdMob integration

I Have added Addmob sdk in my project and even added all framework needed. But m getting below error for StoreKit framework even i have added it in my project but still getting error..
ld: warning: directory not found for option '- L/Users/company/Downloads/projectname/GoogleAdMobAdsSdkiOS-6.4.2/Add- ons/GoogleAnalyticsiOS_2.0beta4/Library'
ld: warning: directory not found for option '-L/Users/company/Downloads/projectname/GoogleAdMobAdsSdkiOS-6.4.2'
ld: warning: ignoring file /Users/company/Downloads/StoreKit.framework/StoreKit, missing required architecture i386 in file /Users/company/Downloads/StoreKit.framework/StoreKit (2 slices)
Undefined symbols for architecture i386:
"_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 search a lot but in every post its sid to add Storkit.. but i have already added it but still getting error. even i have cleaned the project a lot of time.
Just ensure that you have added the following libraries,
1.AudioToolbox
2.MessageUI
3.SystemConfiguration
4.CoreGraphics
Also the frameworks,
1.MessageUI.framework
2.StoreKit.framework
3.SystemConfiguration.framework
According to your error message there is a problem with StoreKit.framework...Please verify that...
Refer: build error when add Admob in iOS app
Add AdSupport.framework, also make it as optional
It says that your StoreKit binary is not build for i386. This should not happen with the default one. Did you download if separately from somewhere? You can find the default here:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer‌​/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/StoreKit.framework
Use that.

Undefined symbols for architecture i386:

I am getting following error while trying to use pdf.h and pdf.mm in my application.
ld: warning: ignoring file /Users/aditya/Desktop/PDFStudy/zdll.lib, file was built for archive which is not the architecture being linked (i386)
"_convertPDF", referenced from:
-[PDFStudyViewController readPDF] in PDFStudyViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
This is because your library /Users/aditya/Desktop/PDFStudy/zdll.lib was compiled for other architectures, for example, arm6 or arm7 used in iPhones.
You are probably testing your app in simulator, which requires library to be compiled for architecture i386.

While AR integrating in custom APP getting errors :(

ld: warning: in /Users/kunwarhanda/Documents/Augmented/WikitudeAPI/libWikitudeAPI.a, missing required architecture i386 in file
Undefined symbols:
"_OBJC_CLASS_$_WTPoi", referenced from:
objc-class-ref-to-WTPoi in AugmentedAppDelegate.o
objc-class-ref-to-WTPoi in CustomMenuButtonDelegateImpl1.o
"_OBJC_CLASS_$_WikitudeARCustomMenuButton", referenced from:
objc-class-ref-to-WikitudeARCustomMenuButton in AugmentedAppDelegate.o
"_OBJC_CLASS_$_WikitudeARView
Controller", referenced from:
objc-class-ref-to-WikitudeARViewController in AugmentedAppDelegate.o
objc-class-ref-to-WikitudeARViewController in CustomMenuButtonDelegateImpl1.o
objc-class-ref-to-WikitudeARViewController in CustomMenuButtonDelegateImpl3.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
**I have cross checked that libWikitudeAPI.a is imported still does'nt know about this error and by the way m new to iPhone
Please can some one help me in this Thanks in advance **
The problem is that the library is only for device not for simulator. Try debug your app and use NSZombieEnabled environment variable for finding actual crash reasons.

TTURLJSONResponse Undefined symbols for architecture i386

Good Day!
I tried to recreate the sample TTFacebook Project of the three20 samples in an XCode4 IDE, but I got this error about TTURLJSONResponse
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TTURLJSONResponse", referenced from:
objc-class-ref in FacebookSearchFeed.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
thanks, much love and respect
Make sure you added Three20:extThree20JSON+YAJL or Three20:extThree20JSON+SBJSON to your project (either manually or via ttmodule.py), also make sure they compile fine (look if the binaries are not red in your project Build Phases).

Undefined symbols when attempting to use CoverStory with iPhone app: _vproc_transaction_end, _vproc_transaction_begin

After following these steps to set up an iphone project with CoverStory, my build fails with two linker errors.
Undefined symbols:
"_vproc_transaction_end", referenced from:
_gcov_exit in libgcov.a(_gcov.o)
_vproc_transaction_end$non_lazy_ptr in libgcov.a(_gcov.o)
(maybe you meant: _vproc_transaction_end$non_lazy_ptr)
"_vproc_transaction_begin", referenced from:
___gcov_init in libgcov.a(_gcov.o)
_vproc_transaction_begin$non_lazy_ptr in libgcov.a(_gcov.o)
(maybe you meant: _vproc_transaction_begin$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status
I'm using Xcode 3.2, GCC 4.2 on Snow Leopard. Any ideas what I'm missing?
Here's how to get gcov running with Xcode 3.2.2, GCC 4.2 on Snow Leopard:
http://code.google.com/p/coverstory/wiki/SnowLeopardGCov
Did you add "-lgcov" to Other Linker Flags as the Web page directs?
What is the value of the MACOSX_DEPLOYMENT_TARGET setting? This page and this page suggests the value needs to be set to 10.6.