Undefined symbols for architecture x86_64 in Xcode 8.3.3 for iOS app

undefined symbols for architecture x86_64 xcode 10
undefined symbols for architecture x86_64 xcode 9
note undefined symbols for architecture x86_64
undefined symbols for architecture armv7
undefined symbols for architecture i386
xcode linker error undefined symbols
missing required architecture x86_64 in file
undefined symbol c++ xcode

I have just created a new project in Xcode 8.3.3 with Swift for iOS and I tried importing the external library SwiftLibModbus

I have ported the library to use Swift 3 (meaning, I fixed all the errors). This library is using another library named libmodbus that is written in C and I am getting an Undefined symbols for architecture x86_64 error when this library is imported.

Here is the full error:

Undefined symbols for architecture x86_64:
  "_modbus_free", referenced from:
      __TFC23SomeProject_Wi_Fi_Connect14SwiftLibModbusD in SwiftLibModbus.o
  "_modbus_strerror", referenced from:
      __TFC23SomeProject_Wi_Fi_Connect14SwiftLibModbusP33_56F751289226F31D555D5DEEC0F0514F12buildNSErrorfT5errnoVs5Int32_CSo7NSError in SwiftLibModbus.o
  "_modbus_write_registers", referenced from:
      __TFFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus23writeRegistersFromAndOnFT7addressVs5Int3211numberArrayCSo7NSArray7successFT_T_7failureFCSo7NSErrorT__T_U_FT_T_ in SwiftLibModbus.o
  "_modbus_read_input_registers", referenced from:
      __TFFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus22readInputRegistersFromFT12startAddressVs5Int325countS1_7successFGSaPs9AnyObject__T_7failureFCSo7NSErrorT__T_U_FT_T_ in SwiftLibModbus.o
  "_modbus_write_register", referenced from:
      __TFFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus13writeRegisterFT7addressVs5Int325valueS1_7successFT_T_7failureFCSo7NSErrorT__T_U_FT_T_ in SwiftLibModbus.o
  "_modbus_write_bit", referenced from:
      __TFFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus8writeBitFT7addressVs5Int326statusSb7successFT_T_7failureFCSo7NSErrorT__T_U_FT_T_ in SwiftLibModbus.o
  "_modbus_new_tcp", referenced from:
      __TFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus8setupTCPfT9ipAddressCSo8NSString4portVs5Int326deviceS2__Sb in SwiftLibModbus.o
  "_modbus_set_error_recovery", referenced from:
      __TFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus8setupTCPfT9ipAddressCSo8NSString4portVs5Int326deviceS2__Sb in SwiftLibModbus.o
  "_modbus_close", referenced from:
      __TFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus10disconnectfT_T_ in SwiftLibModbus.o
  "_modbus_connect", referenced from:
      __TFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus16connectWithErrorfCSo7NSErrorSb in SwiftLibModbus.o
      __TFFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus7connectFT7successFT_T_7failureFCSo7NSErrorT__T_U_FT_T_ in SwiftLibModbus.o
  "_modbus_read_registers", referenced from:
      __TFFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus17readRegistersFromFT12startAddressVs5Int325countS1_7successFGSaPs9AnyObject__T_7failureFCSo7NSErrorT__T_U_FT_T_ in SwiftLibModbus.o
  "_modbus_read_input_bits", referenced from:
      __TFFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus17readInputBitsFromFT12startAddressVs5Int325countS1_7successFGSaPs9AnyObject__T_7failureFCSo7NSErrorT__T_U_FT_T_ in SwiftLibModbus.o
  "_modbus_read_bits", referenced from:
      __TFFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus12readBitsFromFT12startAddressVs5Int325countS1_7successFGSaPs9AnyObject__T_7failureFCSo7NSErrorT__T_U_FT_T_ in SwiftLibModbus.o
  "_modbus_set_slave", referenced from:
      __TFC23SomeProject_Wi_Fi_Connect14SwiftLibModbus8setupTCPfT9ipAddressCSo8NSString4portVs5Int326deviceS2__Sb in SwiftLibModbus.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there any way around this? This is actually the only library I have found available for Modbus.

Thanks :)

Hmmm... Did you drag the files inside a folder using "Copy items if needed" and "Create folder references" marked?

If so, Xcode might not understand it needs to compile the files for the right architecture inside that folder. Just drag the bunch of files directly to Xcode and it should be fine.

Undefined symbols for architecture x86_64 · Issue #1159 · parse , I have just created a new project in Xcode 8.3.3 with Swift for iOS and I tried importing the external library SwiftLibModbus. I have ported the library to use Swift 3  Steps to Reproduce Create an add-to-app module Add the dependency google_maps_flutter: ^0.5.28+1 to pubspec.yaml Run flutter build ios-framework --xcframework --no-universal. Add the generated frameworks to xCode project Run the project

Fails to build with iOS: Undefined symbols for architecture x86_64 , I have just created a new project in Xcode 8.3.3 with Swift for iOS and I tried importing the external library SwiftLibModbus I have ported the library to use Swift 3  heracek changed the title iOS Simulator: Undefined symbols for architecture x86_64 in v0.14.0 iOS: Undefined symbols for architecture x86_64 in v0.14.0 Jun 29, 2017 Copy link Quote reply Member

If you just drag all files to XCode, it builds C code for currently selected architecture, you may need to clean and build project to get library compiled for right architecture after changing target (device/simulator)

To avoid this, native libraries should be built with external script for all required architectures and merged in one "fat" or "universal" library.

Xcode does not found symbols for architecture , Undefined symbols for architecture x86_64 #1159. Closed Create new iOS project with Single View Application in Xcode 8.3.3. Add the  Undefined symbols for architecture x86_64: Switch-Case Tecnologia da informação. Comunidades (19) Booking - 10% de desconto objective-c ios xcode paypal x86-64.

check whether you have import your framework like

@import framework;

Undefined symbols for architecture x86_, app/Contents/Developer • Xcode 11.4.1, Build version 11E503a • CocoaPods version 1.9.1 [✓] Android Studio (version 3.6) • Android Studio at /  LineChartData ios - Undefined symbols for architecture x86_64 on Xcode 6. iCloud minimum requirements. WoW64 has been with us since Windows XP, and x64 wasn’t the only architecture where WoW64 has been available - it was available on IA-64 architecture as well, where WoW64 has been responsible for emulating x86.

Mybe you had draged two library which is same to project, Xcode is confused about which one to use.just delete one,it will be ok.

[MOD-2365] iOS: Including ti.map causes build to error , Xcode (11.3.1) is having issues to found x86_64 architecture symbols while /​ios-armv7_arm64/MyPod.framework/MyPod (2 slices) Undefined symbols for  [ ] Flutter (Channel master, v1.13.7-pre.24, on Mac OS X 10.14.6 18G87, locale en-US) • Flutter version 1.13.7-pre.24 at /Users/samparks/flutter • Framework revision 0aed0b61a1 (15 hours ago), 2020-01-03 17:53:54 -0800 • Engine revision eb139936eb • Dart version 2.8.0 (build 2.8.0-dev.0.0 2f57602411) [ ] Android toolchain - develop for Android devices (Android SDK version 29.0.0

Rad Studio 10.2.3 and Ios 11.3 not working, ld: symbol(s) not found for architecture x86_64 Also, Xcode (8.3.3) tells me to turn off Bitcode generation or get a new version of the framework from the vendor. Can I not just run an app on the simulator at all ? not support the iOS simulator (which is implemented using i386 architecture on the Mac ). Xcode: Undefined symbols for architecture x86 Undefined symbols for architecture x86_64: I have too many native libraries to hand link for both IoS and

Error building for iOS, Xcode 8.3.3 [TRACE] export PATH="/Applications/Xcode.app/Contents/​Developer/ [TRACE] Undefined symbols for architecture x86_64:.

Rad Studio 10.2.3 and Ios 11.3 not working. Konstantin T63638 Hello since i upgraded to XCode 9.3 and ios 11.3 . ld: symbol(s) not found for architecture arm64 Supported Xcode versions: Xcode 8.2.x, 8.3.2, 8.3.3 and 9.x including 9.3 Has anyone succeeded in compiling an IOS app with xcode 9.3 / 11.3 SDK​?

Comments
  • FYI, on React Native I had to run react-native link and then Clean and Rebuild to fix this.
  • OMFG I can't believe that was the issue... I feel so stupid. Thanks!
  • @EpicSyntax , ha ha ha :D in this case, you are not alone. +1 for you 'JozeRi'.
  • I have dragged these files straight to Xcode, selected my iPhone 7 as the device, did a clean & build but still no success :(
  • Check build settings of the project, there should be arm64 selected
  • Already checked that. Valid architectures is set to arm64 armv7 and armv7s
  • But error output says SwiftLibModbus.o is built for x86_64 for some reason
  • I noticed this too... but notice that it's regarding it's usage of the libmodbus library's methods. for example _modbus_free. Though if I remove the code from SwiftLibModbus.swift, everything compiles fine (without removing the libmodbus library)
  • It is being imported via a bridging-header file like so: #import "libmodbus/modbus.h"
  • while using objective-C framework in swift,you have to import that framework in that corresponding class.
  • @Madhumitha there is no objc framework, he build static library