title: XCode undefined symbols error with c++ dynamic library
body: <p>I am trying to create C++ dynamic library in XCode 6,  very simple one just as a test.
  I've built it and trid to integrate it to both c++ other app and Obj-C app, but I always get same error !
  I've searched everywhere ! I'm loosing my mind ;p</p>
  
  <p>See codes of my library, of my test code and error message below :</p>
  
  <p><strong>Library iOSLibView.cpp :</strong></p>
  
  <pre><code>    #include &lt;iostream&gt;
      #include "iOSLibView.h"
  
  
      iOSLibView::iOSLibView(){
  
      }
  
      iOSLibView::~iOSLibView(){
  
      }
  
  void iOSLibView::testLib(){
      std::cout &lt;&lt; "First C++ Lib" &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p><strong>Library iOSLibView.h :</strong></p>
  
  <pre><code>    #include &lt;stdio.h&gt;
  
  class iOSLibView{
      public :
      iOSLibView();
          ~iOSLibView();
  
          void testLib();
  };
  </code></pre>
  
  <p>Here's the code in second project which integrates my compiled dynamic library :</p>
  
  <p><strong>Test code :</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "iOSLibView.h"
  
  int main(int argc, const char * argv[]) {
      iOSLibView libTest;
      //libTest.testLib();
  
      return 0;
  }
  </code></pre>
  
  <p><strong>And error message :</strong></p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "iOSLibView::iOSLibView()", referenced from:
        _main in main.o
    "iOSLibView::~iOSLibView()", referenced from:
        _main in main.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>In second project, I added .dyn file in build phase, <strong>Link binary with libraries</strong> and <strong>copy files</strong>.</p>
  
  <p>I tried too to build my library as a static one and everything works perfectly ! I just meet issues with dynamic libraries...</p>
  
  <p>Thanks for your help !!!</p>