title: Cross compiling pdcurses from arch linux to windows
body: <p>I'm trying to cross-compile a simple "Hello World!" program, from arch linux to windows</p>
  
  <p>Here's the code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;curses.h&gt;
  
  int main() {
      initscr();
  
      printw("Hello World!");
      refresh();
      getch();
  
      endwin();
      return 0;
  }
  </code></pre>
  
  <p>And then I compile using mingw:</p>
  
  <p><code>x86_64-w64-mingw32-gcc hello.c -o hello-x64.exe -lpdcurses.dll</code></p>
  
  <p>And when I run the program, it crashes. Here's it's <a href="http://pastebin.com/rGVeBYvu" rel="nofollow">trace</a></p>