MinGWでckwをコンパイルしようとしてはまる

ertr000001.o:(.rdata+0x0): undefined reference to `_pei386_runtime_relocator'

結論から言うと、エントリポイントのwWinMainをやめて、WinMainにしてLWPSTRをやめたらいけた。

int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int nCmdShow)
$ g++.exe  main.o option.o selection.o ime_wrap.o misc.o rsrc.res -mwindows  -o ckw.exe


mingwではUNICDOE判のwWinMainは未実装らしい。
http://cat-in-136.blogspot.com/2010/03/mingw32undefined-reference-to-winmain16.html