creating shared dlls yields undefined reference to `WinMain@16' in mingw 4.3

Andrew Haley
Wed Dec 17 10:35:00 GMT 2008

Danny Smith wrote:
> Sorry for joining this thread sideways and lately
> At:
> Andrew Haley wrote:
>> "So, which object file in libmingw.a contains the undefined reference to
>> `WinMain@16'  And what dependency is causing it to be pulled in?"
> On i386 targets libgcj has a undefined reference to 'main' due to the
> fallback backtrace code introduced with this patch:
> A dummy main() in the dll is one workaround,  but you need to be
> careful not to export it.

Mmm, but it won't do the job we need: we have to have the address of
the real main.  Is there some Windows equivalent of dlsym() we can


More information about the Java mailing list