This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: creating shared dlls yields undefined reference to `WinMain@16' in mingw 4.3
- From: Andrew Haley <aph at redhat dot com>
- To: Danny Smith <dansmister at gmail dot com>
- Cc: d2walter at hotmail dot com, java at gcc dot gnu dot org
- Date: Wed, 17 Dec 2008 10:34:55 +0000
- Subject: Re: creating shared dlls yields undefined reference to `WinMain@16' in mingw 4.3
- References: <9c03c2dd0812162346v65d8cc98hf6e0edc91dd1e000@mail.gmail.com>
Danny Smith wrote:
> Sorry for joining this thread sideways and lately
> At: http://gcc.gnu.org/ml/java/2008-12/msg00032.html
>
> 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
use?
Andrew.