単純な「Hello World!」をクロスコンパイルしようとしています。プログラム、arch Linux から Windows へ
コードは次のとおりです。
#include <stdio.h>
#include <curses.h>
int main() {
initscr();
printw("Hello World!");
refresh();
getch();
endwin();
return 0;
}
そして、mingw を使用してコンパイルします。
x86_64-w64-mingw32-gcc hello.c -o hello-x64.exe -lpdcurses.dll
そして、プログラムを実行すると、クラッシュします。その跡がこちら