title: Xcode 9.4.1: Undefined symbols for architecture armv7, arm64, x86_64
body: <p>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.</p>
  
  <p><strong>Issue</strong></p>
  
  <pre><code>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)
  </code></pre>
  
  <p><strong>I have tried these methods</strong></p>
  
  <ol>
  <li><p><code>Other Linker Flags</code> add <code>$(inherited)</code></p></li>
  <li><p>delete <code>DerivedData</code></p></li>
  <li><p>set <code>NO</code> to <code>Active Architecture Only</code></p></li>
  </ol>
  
  <p><strong>lipo -info</strong></p>
  
  <p><code>Architectures in the fat file: xml are: x86_64 armv7 armv7s arm64</code></p>
  
  <p><strong>Attached screenshot</strong></p>
  
  <p><a href="https://i.stack.imgur.com/wbzSg.jpg" rel="nofollow noreferrer">Project structure</a></p>