title: Undefined symbols for architecture armv7: "_OBJC_CLASS_$_QlmLicense"
body: <p>I know this question looks like a duplicate and the answer may already be out there but I haven't been able to find it.  I'm getting the hang of the problem by looking at other answers but my situation is a little different and it's causing me some confusion.  </p>
  
  <p>Let me try to explain.</p>
  
  <p>I have a .framework project that I have created.  <strong>Here are my Link Binary With Libraries:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/Nx5od.png" alt="My Link Binary With Libraries"></p>
  
  <p><strong>Here are my architecture settings:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/pvE0Q.png" alt="enter image description here"></p>
  
  <p><strong>This is the error:</strong></p>
  
  <pre><code>Undefined symbols for architecture armv7: "_OBJC_CLASS_$_QlmLicense", referenced from: objc-class-ref in id2(MainViewController.o)
  </code></pre>
  
  <p>You can tell by the error that my MainViewController in id2.framework is referencing the QlmLicense class (which is in a QlmLicenseMobile.framework).  So, <strong>here are the Target files for QlmLicenseMobile.framework</strong> (with details listed below):</p>
  
  <p><img src="https://i.stack.imgur.com/lCaSt.png" alt="enter image description here"></p>
  
  <p>The source and header files are all there and there are no libraries in the Link Binary With Libraries section.  The Copy Bundle Resources contains only the infoPlist.strings and the Copy Files contains only the QlmLicenseMobile.framework.</p>
  
  <p><strong>Here are the architectures for QlmLicenseMobile.framework:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/Pxvx1.png" alt="enter image description here"></p>
  
  <p><strong>Finally</strong>, the build error occurs in my demo application.  <strong>Here are the Link Binary With Libraries files:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/CotJq.png" alt="enter image description here"></p>
  
  <p><strong>And here are the architectures:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/v1TNw.png" alt="enter image description here"></p>
  
  <ol>
  <li><p>My .framework and demo projects were playing well together.</p></li>
  <li><p>Now I'm using the QlmLicenseMobile.framework from within my .framework project.  These two build fine together.</p></li>
  <li><p>It's my demo project that gives me the error.</p></li>
  </ol>
  
  <p><strong>So, to be clear, my references are as such:</strong></p>
  
  <p>demo app     <strong>-----></strong>     my.framework app     <strong>-----></strong>     QlmLicenseMobile.framework app</p>
  
  <p>Anyway, yeah, this is a little more complicated than your usual library settings.  I don't know what else I need to do/add to the demo project to get it to build.  Any ideas?</p>
  
  <blockquote>
    <p>Adding new information to help someone else with this problem.</p>
  </blockquote>
  
  <p>Part of the problem was solved by <a href="https://stackoverflow.com/a/21867431/1735836">Warren Burton</a> in his answer. </p>
  
  <p>The second problem was that <strong>I needed to add to my demo app a library that was being used by the third party</strong> QlmLicenseMobile.framework, even though that framework was contained in my.framework. Since everything was contained in my.framework I didn't know I still needed to add their framework AND the libxml2.2.dylib to my demo app. I tried to add their framework but that didn't work. Then I got the bright idea to try adding the libxml2.2.dylib and voila! That was the magic missing piece of the puzzle.  So, it turned out to look more like this:</p>
  
  <p>demo app     <strong>-----></strong>     my.framework app     <strong>-----></strong>     QlmLicenseMobile.framework</p>
  
  <p>demo app     <strong>-----></strong>     my.framework app     <strong>-----></strong>     libxml2.2.dylib</p>
  
  <p>demo app     <strong>-----></strong>     QlmLicenseMobile.framework</p>
  
  <p>demo app     <strong>-----></strong>     libxml2.2.dylib</p>
  
  <p><strong>Here is an updated image of the Link Binary With Libraries files for my demo app:</strong> </p>
  
  <p><img src="https://i.stack.imgur.com/DzfXq.png" alt="enter image description here"></p>