From: aking@dreammechanics.com
To: java@gcc.gnu.org
Subject: incorrect? link order for mingw gcj
Date: Thu, 04 Apr 2002 07:14:00 -0000 [thread overview]
Message-ID: <20020404083016.A4164@dreammechanics.com> (raw)
There seems to be a library link order problem with the current cvs 3.1
branch of the mingw32 cross compiler. A simple hello world compiles
and runs fine, however, this simple java program fails to compile:
public class GCJTest
{
public static void main( String[] args )
{
try
{
Thread.sleep( 2000 );
}
catch( Exception e ) {}
}
}
the error is:
aking@nanostorm:~/gcj-test$ i686-pc-mingw32-gcj --main=GCJTest -o /tmp/gcjtest.exe GCJTest.java
/home/aking/mingw-gcc/lib/gcc-lib/i686-pc-mingw32/3.1/../../../../i686-pc-mingw32/lib/libgcj.a(exception.o): In function `abort':
/home/aking/compile/mingw-gcj/bin/i686-pc-mingw32/libjava/../../../gcc/libjava/exception.cc:27: multiple definition of `abort'
/home/aking/mingw-gcc/lib/gcc-lib/i686-pc-mingw32/3.1/../../../../i686-pc-mingw32/lib/libmsvcrt.a(ds00510.o)(.text+0x0): first defined here
However, if I add in the libraries '-lgcj -lmsvcrt', it compiles and runs fine:
aking@nanostorm:~/gcj-test$ i686-pc-mingw32-gcj -lgcj -lmsvcrt --main=GCJTest -o /tmp/gcjtest.exe GCJTest.java
aking@nanostorm:~/gcj-test$
I know almost nothing about how the configure/make build system
works, so I have no idea where to look, sorry. Anyways, I'll continue
on with some other patches I'm working on for mingw32 version.
Adam
next reply other threads:[~2002-04-04 13:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-04 7:14 aking [this message]
2002-04-04 17:10 ` Bryce McKinlay
2002-04-05 21:37 ` Adam Megacz
2002-04-08 7:48 ` libjava exception fix was:Re: " Andreas Tobler
2002-04-08 13:24 ` Adam Megacz
2002-04-09 5:00 ` Andreas Tobler
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=20020404083016.A4164@dreammechanics.com \
--to=aking@dreammechanics.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).