title: Apple Mach-O Link (Id) Error
body: <p>My code is identical to <a href="https://stackoverflow.com/questions/9541768/error-no-previous-prototype-for-function-why-am-i-getting-this-error">this</a> question I asked earlier so there's no point in duplicating it here</p>
  
  <p>This is the error I am getting:</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "_stdscr", referenced from:
        _screen_init in screen.o
    "_werase", referenced from:
        _screen_init in screen.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>I've had this error in the past and I feel like it has something to do with a duplicate function name or something, but I have no idea how to debug this. </p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>After adding the libncurses.dylib file to my project, the errors discussed above have disappeared, but a new error has emerged when I call screen_init(); in my main.cpp:</p>
  
  <p>// main.cpp</p>
  
  <pre><code>#include "screen.h"
  
  int main(){
     screen_init();
  }
  </code></pre>
  
  <p>// new error</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "screen_init()", 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>Pretty much the same error except now in my main. Is there another library I am missing? These errors are very mysterious and not very helpful.</p>