title: Create a box in C Program with Curses
body: <p>I am trying to create a box with a game inside the box, but for now I am using the text <code>this is my box</code> for testing. I am very confusing with curses for first time but I am trying to learn for myself in my spare time. I do not have any problems with other C program before but this time, I keep getting the message error after when I compile on Repl.it, but <code>#include &lt;windows.h&gt;</code> does not existing in the system file or on the Linux system too. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;ncurses.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main(int argc, char ** argv){
  
    initscr();
    int height, width, start_y, start_x;
    height = 10;
    width = 20;
    start_y = start_x = 10;
  
    WINDOW * win = newwin(height, width, start_y, start_x);
    refresh();
  
    box(win, 0, 0);
    mvwprintw(win, 1, 1, "this is my box");
    wrefresh(win);
  
    int c = getch();
  
    endwin();
  
  
  
  return 0;
  }
  </code></pre>
  
  <p><strong>Error Messages:</strong></p>
  
  <pre><code>gcc version 4.6.3
  exit status 1
  /tmp/cc3HSdBS.o: In function `main':
  main.c:(.text+0x10): undefined reference to `initscr'
  main.c:(.text+0x3e): undefined reference to `newwin'
  main.c:(.text+0x49): undefined reference to `stdscr'
  main.c:(.text+0x51): undefined reference to `wrefresh'
  main.c:(.text+0x82): undefined reference to `wborder'
  main.c:(.text+0xa6): undefined reference to `mvwprintw'
  main.c:(.text+0xb2): undefined reference to `wrefresh'
  main.c:(.text+0xb9): undefined reference to `stdscr'
  main.c:(.text+0xc1): undefined reference to `wgetch'
  main.c:(.text+0xc9): undefined reference to `endwin'
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>Compiled with:</p>
  
  <pre><code>g++ -Incurses project.c -o project
  </code></pre>