1

I created a framework using CMake and added it to the test project. Then import the header file and everything works fine. I got this error when I call the method. I don't know why this error occurs. I tried almost all possible ways, but it didn't work. Any suggestions will be grateful.

Issue

Undefined symbols for architecture armv7:
  "XmlInterface::XmlInterface()", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
  "XmlInterface::~XmlInterface()", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have tried these methods

  1. Other Linker Flags add $(inherited)

  2. delete DerivedData

  3. set NO to Active Architecture Only

lipo -info

Architectures in the fat file: xml are: x86_64 armv7 armv7s arm64

Attached screenshot

Project structure

YangHui
  • 43
  • 1
  • 6
  • Do not post images with text, add the text itself into the question post. This is about your first screenshot with the error message. – Tsyvarev Jul 17 '18 at 08:48
  • @Tsyvarev Thanks for your suggestion, I will modify it right away. – YangHui Jul 17 '18 at 08:54

1 Answers1

1

Your compiling with a binary that has been compile on simulator, but try to run the app on a real device.

The simplest way is to compile on device, then run on device. The hardest way is to check what can be done with "lipo" :)

SeikoTheWiz
  • 853
  • 1
  • 10
  • 27