public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Daniel Walter" <d2walter@hotmail.com>
To: "Andrew Haley" <aph@redhat.com>, 	"Danny Smith" <dansmister@gmail.com>
Cc: <java@gcc.gnu.org>
Subject: Re: creating shared dlls yields undefined reference to `WinMain@16' in mingw 4.3
Date: Wed, 17 Dec 2008 18:45:00 -0000	[thread overview]
Message-ID: <BLU138-DAV80D362137F442D4C21F3080F20@phx.gbl> (raw)
In-Reply-To: <4948D5CF.8070301@redhat.com>

I have been trying to proceed with a dummy WinMain, but I have been having 
some strange errors.  I am still tracing through this, but am not sure how I 
could be getting java.lang.NoClassDefFoundError with something that should 
have linked in.

Are you saying we need the address of the real main for the backtrace to 
work.  This could explain some of the weirdness in the backtraces.  Having 
the real WinMain address is probably not going to do any good though because 
this is a gcc dll that is being used in a VC++ application.  I don't think 
gcc can backtrace through the VC call stack.

Daniel

PDF library message java.lang.ExceptionInInitializerError^M
   at java.lang.Class.initializeClass(pdflink.cpp:0)^M
   at java.util.Currency.getInstance(pdflink.cpp:0)^M
   at java.text.DecimalFormatSymbols.<init>(pdflink.cpp:0)^M
   at com.lowagie.text.pdf.ByteBuffer.<clinit>(pdflink.cpp:0)^M
   at java.lang.Class.initializeClass(pdflink.cpp:0)^M
   at com.lowagie.text.pdf.PdfName.<init>(pdflink.cpp:0)^M
   at com.lowagie.text.pdf.PdfName.<init>(pdflink.cpp:0)^M
   at com.lowagie.text.pdf.PdfName.<clinit>(pdflink.cpp:0)^M
   at java.lang.Class.initializeClass(pdflink.cpp:0)^M
   at com.lowagie.text.pdf.PdfWriter.<clinit>(pdflink.cpp:0)^M
   at java.lang.Class.initializeClass(pdflink.cpp:0)^M
   at com.lowagie.text.pdf.PdfWriter.getInstance(pdflink.cpp:0)^M
   at ads.Draw.createDocument(pdflink.cpp:0)^M
Caused by: java.lang.NullPointerException^M
   at java.io.InputStreamReader.read(pdflink.cpp:0)^M
   at java.io.BufferedReader.fill(pdflink.cpp:0)^M
   at java.io.BufferedReader.readLine(pdflink.cpp:0)^M
   at java.util.Properties.load(pdflink.cpp:0)^M
   at java.util.Currency.<clinit>(pdflink.cpp:0)^M
   at java.lang.Class.initializeClass(pdflink.cpp:0)^M
   ...12 more^M


PDF library message java.lang.NoClassDefFoundError: 
com.lowagie.text.pdf.PdfName
^M
   at java.lang.Class.initializeClass(pdflink.cpp:0)^M
   at com.lowagie.text.pdf.BaseFont.<clinit>(pdflink.cpp:0)^M
   at java.lang.Class.initializeClass(pdflink.cpp:0)^M
   at com.lowagie.text.pdf.BaseFont.createFont(pdflink.cpp:0)^M
   at ads.Draw.getEmbedFont(pdflink.cpp:0)^M

----- Original Message ----- 
From: "Andrew Haley" <aph@redhat.com>
To: "Danny Smith" <dansmister@gmail.com>
Cc: <d2walter@hotmail.com>; <java@gcc.gnu.org>
Sent: Wednesday, December 17, 2008 5:34 AM
Subject: Re: creating shared dlls yields undefined reference to `WinMain@16' 
in mingw 4.3


> 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.
> 

  reply	other threads:[~2008-12-17 18:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17  7:47 Danny Smith
2008-12-17 10:35 ` Andrew Haley
2008-12-17 18:45   ` Daniel Walter [this message]
2008-12-17 18:56     ` Andrew Haley
  -- strict thread matches above, loose matches on Subject: below --
2008-12-18  4:12 Daniel Walter
2008-12-18 10:17 ` Andrew Haley
2008-12-18 11:42   ` BGB
2008-12-18 17:03   ` Daniel Walter
2008-12-19  5:44     ` BGB
     [not found]       ` <BLU138-DAV5CF88D886B9DC7B21FB2F80F00@phx.gbl>
2008-12-19 20:07         ` BGB
2008-12-16  5:54 Daniel Walter
2008-12-16 10:39 ` Andrew Haley
2008-12-16 16:31   ` Daniel Walter
2008-12-16 17:30     ` Andrew Haley
2008-12-16 20:11       ` Daniel Walter
2008-12-16 20:26         ` Andrew Haley
2008-12-16 20:55           ` Daniel Walter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLU138-DAV80D362137F442D4C21F3080F20@phx.gbl \
    --to=d2walter@hotmail.com \
    --cc=aph@redhat.com \
    --cc=dansmister@gmail.com \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).