Building Box2d in Eclipse CDT

Hi, I could build box2d project in VS2008 successfully.
I tried to build it in Eclipse CDT, but failed. The compiler is Mingw GCC.
The error message is
/mingw/lib/libmingw32.a(main.o):main.c:(.text+0x104): undefined reference to `WinMain@16'

My goal is to compile box2d and run testbed in Eclipse CDT.

Is there anyone who writes code in Eclipse CDT?
Thanks in advance.

Original thread: https://box2d.org/forum/viewtopic.php?t=4085