Whenever I add an object file that was generated with gcj to a g++ link command for a shared dll, I get an undefined reference to `WinMain@16'. I am not sure why this is required for a dll. I tried posting questions about this to the GCJ list first, and they gave me some suggestions about things to try to get more information for diagnosing this. The error below indicates that this main.o is linked in - this happens whenever java.lang.Object (or probably anthing else) is used from the libgcj.a library.
c:/documents and settings/dan/my documents/programs/cygwin/home/dan/ming/bin/../
ed reference to `WinMain@16'