It looks like you are missing including the IOBluetooth.framework in your project. You can add it by:
Clicking on your project in the upper left of the left pane (the blue icon).
You are watching: Undefined symbols for architecture x86_64 c++
In the middle pane, click on the Build Phases tab.
Under “Link Binary With Libraries”, click on the plus button.
Find the IOBluetooth.framework from the list and hit Add.
This will make sure that the IOBluetooth.framework definitions are found by the linker. You can see that the framework is a member of your target by clicking on the framework in the left pane and seeing the framework”s target membership in the right pane (note I”ve moved the framework under the Frameworks group for organization purposes):
Apple requires to use arm64 architecture. Do not use x32 libraries in your project
So the answer below is not correct anymore!
The new Xcode 5.1 sets the architecture armv7,armv7s,and arm64 as default.
And sometimes the error “build failure “Undefined symbols for architecture x86_64”” may be caused by this. Because, some libs (not Apple”s) were compiled for x32 originally and doesn”t support x64.
So what you need, is to change the “Architectures” for your project target like this
If you”re using Cocoapods – you should do the same for “Pods” target.
Undefined symbols for architecture x86_64: “_OBJC_CLASS_$_xxx”, referenced from: objc-class-ref in yyy.o
This generally means, you are calling “xxx” (it may be a framework or class) from the class “yyy”. The compiler can not locate the “xxx” so this error occurs.
You need to add the missing files(in this case “xxx”) by right click on your project folder in navigator window and tap on “Add files to “YourProjectName“” option.
A popup window will open your project files in Finder. There, you can see the missing files and just add them to your project. Don”t forget to check the “Copy items if needed” box. Good luck!!
Image blur detection for iOS in Objective CUsing useless object.self.self.. or Class.self.self.. is ever need?iPhone is not available. Please reconnect the device. / iOS 14.2 – Xcode 12.1NSKeyValuePopPendingNotificationLocal Crash on iOS 13 and 14Media Items in JSQMessageViewController”s Collection cells are not showing in IOS 14Xcode 12, How to suppress “Double-quoted include in framework header” warnings throughout entire projectError installing cocoapods “sudo gem install cocoapods” MacOs CatalinaThe purchase dialog does not show up since iOS 13.4Unchanged barTintColor UINavigationBar on iOS 13.4How can I create object and use it in Objective-C?