I have problem with use OpenStreetMap lib and Bump lib.
I obtained critical error -
ld: duplicate symbol _OBJC_IVAR_$_FMDatabase.databasePath in /Users/
alex/APP/BumpAPI/libBumpAPI.a(FMDatabase.o) and /Users/alex/APP/
CloudMade/libs/route-me/libMapView.a(FMDatabase.o) for architecture
armv6
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-
gcc-4.2 failed with exit code 1
I find solve for this problem.
I find sources of RoutMe library, that includes in CloudMade library. And change name of class "FMDatabase" to "_FMDatabase". Next, rebuild libMapView.
But, this problem exist with other libraries (non open-source) in other projects.
Related
I have the following failed code when i run my application on iPhone 5.1 simulator. My app runs smoothly before i add in the Facebook Connect into my application.
Undefined symbols for architecture i386:
"_FBCreateNonRetainingArray", referenced from:
-[FBSession initWithKey:secret:getSessionProxy:] in FBSession.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
May I know what can i do to get rid of this?
Thanks
2 things that usually get rid of that error.
1) go to: target > build phases > link binary with library -- make sure you've added the correct framework
2) go to: target > build phases > compile sources -- add any implementation files that are in your program but do not appear in that list.
Those two steps usually fix that kind of error.
I'm not sure exactly why i'm getting this. It usually comes because of a missing framework, except its mentioning a class I already have in my project, and imported into the file it's saying the error is on. It says...
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ELCImagePickerController", referenced from:
objc-class-ref in JCreateViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
JCreateViewController.m had this in the imports:
#import "ELCImagePickerController.h"
So i don't really know why it's giving me this error.
Any ideas?
In the interest of providing an acceptable answer, from the comments:
Make sure ELCImagePickerController is included in your project's Compile Sources build phase.
you can add resources to your projects build phases by simple select and add see this link
this has made me crazy today, I use ASIHTTPRequest, http://allseeing-i.com/ , already, but here, am trying now to add it to an app, once added it gave me this crazy error.
I have started a new fresh project, and commented all related code, added the code without it, and yes, it works, added it, and it's libraries and no it doesn't work and I got this crazy Error, I'm stuck and need help.
BTW, this is the detailed error,
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libz.1.2.3.dylib, missing required architecture i386 in file
ld: warning: ignoring file /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.dylib, missing required architecture i386 in file
ld: in /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libobjc.A.dylib, missing required architecture i386 in file for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
Thank you,
Regards,
Ahmed
I got the answer now.
I have copied the older version, a working version of my app. Or just create a new project and add the files that are not related to this, and make sure it's working and building.
Then, Added the frameworks from project setting (first icon on left) and then added from the build phase the correct libraries.
My problem was : I was trying to add the libraries by dragging them into my project, and the problem was specially for this one. libz.1.2.3.dylib. Thank you anyways, hope this is helpful for someone.
ld: warning: directory not found for option '-L/Users/MYcomputer002/Documents/MGTwitterEngineTest/yajl/build/yajl-1.0.7/lib'
ld: framework not found Cocoa
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
I am implementing MGTwitterEngine in my project. After large modification and removing an error I stuck with the above error. What about this exact error?
MGTwitterEngine references but doesn't contain yajl. You have to add it yourself. You can download and copy the files manually or add it as a framework following the instructions at the yajl page.
If you dig around in the MGTwitterEngine you'll see the yajl files in red, that means they are missing. You'll find the same problem with OAuthConsumer and TouchJSON.
I've been fighting this framework error for days now. I have included the MessageUI framework from the iphone3.0sdk and imported the header file(MessageUI/MessageUI.h)
Anyone know what this error means?
collect2: ld returned 1 exit status
symbol(s) not found
literal-pointer#_OBJC#__cls_refs#MFMailComposeViewController
".objc_class_name_MFMailComposeViewController", referenced from:
Here is some output from the build log:
ld warning: in /Users/me/iphone/myApp/MessageUI.framework/MessageUI, missing required architecture i386 in file
Undefined symbols:
".objc_class_name_MFMailComposeViewController", referenced from:
literal-pointer#__OBJC#__cls_refs#MFMailComposeViewController in myViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
You forgot to link to the MessageUI.framework or you're linking to the wrong version.
Here's the right way to add frameworks:
Double-click your target
Select the main tab
Add the framework by pressing the plus-button in the frameworks section
Now you should be able to build for the simulator and the device.
Edit:
The warning from ld looks like you copied the MessageUI.framework from the simulator SDK to your project directory. Delete it and ld should find the right one (the one in your current SDK).
You accidentally copied the iPhone SDK Framework into your project directory (on disk). Open your project directory (where you keep the project on disk) and delete the iPhone SDK Framework directory.
Rebuild.