This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: install gcj with mingw


On Mon, 27 Oct 2003, Stefan Deseke wrote:
> I installed them in this order in a new empty folder but when I try to compile
> a java program with. "gcj test.java" I still get an error message

You probably want "gcj test.java --main=test"

> C:/mingw/bin/../lib/gcc-lib/mingw32/3.3.1/../../../libmingw32.a(main.o)(.text+0
> x97):main.c: undefined reference to `WinMain@16'

What's happening is that main.java lacks a "main" symbol, so it binds to
one in the library.

The "main" method in your test class doesn't work at all like a C or C++
main() function.  Please read the gcj documentation.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]