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

"Daniel Walter" <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
Thank you for your help, I wasn't sure which group to go to first on this. 
I will try reporting this to MingW.

Daniel

----- Original Message ----- 
From: "Andrew Haley" <[email protected]>
To: "Daniel Walter" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, December 16, 2008 3:26 PM
Subject: Re: creating shared dlls yields undefined reference to `WinMain@16' 
in mingw 4.3


> Daniel Walter wrote:
>
>>
>>> Daniel Walter wrote:
>>>> It appears that libmingw.a is causing the problem, though this library
>>>> can be linked to form a dll as long as no gcj object files are linked 
>>>> as
>>>> well. Below are the results of the attempts to link with 'g++ -v' first
>>>> with gcj objects which failed and the second time with only g++ 
>>>> objects.
>>>
>>> So, which object file in libmingw.a contains the undefined reference to
>>> `WinMain@16'  And what dependency is causing it to be pulled in?
>
>> I tried adding -Wl,-y,_WinMain@16 so that I could find out where this
>> reference was missing.  The result was main.o - this was also in the
>> previous output.
>
> OK, so there's a file called main.o that for some reason is pulled in when
> linking.  I have no idea; I think we need mingw32 experts.
>
> Andrew.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.