You need to learn about the ways in which GCJ differs from the stock Sun Java Tools. In particular, you need to use the "--main=" option to nominate the class that bears the primary entry point. See <http://gcc.gnu.org/java/faq.html#4_1> for more.
In general, familiarize yourself with the information at <http://gcc.gnu.org/java/> if you want to use GCJ in place of or in addition to the Sun tools (or Jikes, for that matter).
Randall Schulz
At 05:20 2004-02-16, Jason Fu wrote:
Any idea about it...
$ gcj HelloWorld.java /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../libcygwin.a(libcmain.o)(.text+0 x7 c): undefined reference to [EMAIL PROTECTED]' collect2: ld returned 1 exit status
===================================================== public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } =====================================================
http://www.hkucs.org:8080/~tsfu/
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/