I'm trying to write a C file from the tutorial in my cocoa project however, I'm getting errors like
Undefined symbols for architecture x86_64:
"_IOIteratorNext", referenced from:
_MyGetDeviceFilePath in USBInterceptor.o
"_IOMasterPort", referenced from:
_MyFindEjectableCDMedia in USBInterceptor.o
....
Does somebody know what's wrong?
The error suggests that you need to add the IOKit framework to the link step of your project's build phases.
Related
I have a framework Xcode project A, and an app Xcode project B that uses the framework binary of A.
When I try to instantiate an object of my framework in my app, it gives me this link error :
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_MyClass", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture arm64
My framework is arm64, I verified with lipo -info .
The symbol _OBJC_CLASS_$_MyClass is in the framework, I verified with nm mylib | grep MyClass
I don't understand how it is possible that this symbol is not found.
What could be the cause of this ? Any help would be appreciated, thanks a lot..
I solved my issue by setting Symbols Hidden by Default to No in the build settings.
Or, I could also add __attribute__ ((visibility("default"))) in front of my class if I wanted to keep that option and hide all other symbols.
I'm trying to use the MWPhotoBrowser project in my project. I followed the whole installation process and was able to import the MWPhotoBrowser.h file. When I tried to build, I run into this error...
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MWPhotoBrowser", referenced from:
objc-class-ref in PhotoBrowserViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know how to resolve this?
Thanks
For anyone getting this issue...Please check if you correctly linked your project to the libMWPhotoBrowser.a file under Build Phases in your target settings !
Just before distributing my app throughout App Store, I'm getting this error.
I've did move some files from other project, but I did check on compile sources for the .m files ( they were already there so I didn't had to add any files). Plus, I've changed the " build architecture only " to No.
Another change I've did is leave only 'armv7' on " valid architectures ".
The error is :
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MWFeedParser", referenced from:
objc-class-ref in ListadoArticulosViewController.o
ld: symbol(s) not found for architecture armv7
clang: error:
Now the MWFeedparser class is from the cocopods installation located at other pod, so I didn't do any rough changes in the pod ( should I ? ) .
Note : the project do work in my release and debug profile, I'm getting this error only with my distribution profile. Any suggestions?
for those who stuck with this annoying error, all you got to do is add the (mwfeedparser).a to the compile sources . I spent hours to figure it out hope it's going to be helpful to someone.
I dragged the Flurry.h and libFlurry.a to my project. Added the neccessary inovation in my main delgate with a correct key. I already had the SystemsConfigurations.framework in my project. When buildin I get the follow:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_Flurry", referenced from:
objc-class-ref in KitzyAppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1
I have checked other build issues on Stackoverflow and nothing worked. Flurry's document is pretty lacking in details and problem solving.
Stackoverflow Lords please help!
Thanks in advance
I fixed this issue, users need to refer to the readMe .pdf with the zip file as you need to move the sdk folder with the two files into your xcode project.
I use zxing lib in my OS X application. I've included zxing-objc to my project and simply copy-pasted code from zxing demo (zxing-root/objc/examples/demo) to the separate ViewController class. When trying to compile project, I get the following linker errors:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_QTCaptureDevice", referenced from:
objc-class-ref in ScanViewController.o
"_OBJC_CLASS_$_ZXCapture", referenced from:
objc-class-ref in ScanViewController.o
"_QTMediaTypeMuxed", referenced from:
-[ScanViewController performVideoSourceScan] in ScanViewController.o
"_QTMediaTypeVideo", referenced from:
-[ScanViewController performVideoSourceScan] in ScanViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've carefully checked all code and compared my project properties (including c++ compiler options) to demo project properties, and everything is done right.
You need to add the necessary frameworks to your app target. You can look in the sample app for an example. Select the target in Xcode, select Build Phases, and open the Link With Libraries entry. You'll see that it includes both QuartzCore and zxing-objc-framework. It sounds like you don't have those in your project.