title: Undefined reference when using ncurses on linux
body: <p>I'm trying to start developing a program using ncurses on Linux. I can't even get the Hello World example to compile. Here's the code:</p>
  
  <pre><code>#include &lt;curses.h&gt;
  
  int main()
  {         
          initscr();
          printw("Hello, world.");
          refresh();
          getch();
          endwin();
          return 0;
  }
  </code></pre>
  
  <p>When I attempt to compile, I get:</p>
  
  <pre><code>hello.c:(.text+0x12): undefined reference to `initscr'
  </code></pre>
  
  <p>For every one of those called functions.</p>
  
  <p>I installed ncurses via apt-get, and also by downloading the sources and compiling, installing, etc.</p>
  
  <p>I have tried <code>#include</code> both <code>curses.h</code> and <code>ncurses.h</code>.</p>
  
  <p>What is going on?</p>