すごくメモ帳

すごくほぼメモ帳ぐらいなブログ

WSL から gcc で C 言語を *.exe へコンパイル

mingw-w64 のインストール

sudo apt-get install mingw-w64

コンパイル

// test.c
#include <stdio.h>

int main(void){
    puts("Hello, world");
    return 0;
}
# コンパイル
i686-w64-mingw32-gcc test.c
# 実行
./a.exe