Bug 51139

Summary: Bad: can't link gcj java source code files Bad: crt1.o undefined reference to main in funct start()
Product: [Retired] Red Hat Linux Reporter: Need Real Name <awachold>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-08-07 19:56:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2001-08-07 19:56:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (Win98; U)

Description of problem:
I can't use the GCJ compiler for working with java programs.
HERE IS WHAT I CAN DO:
                +  Preprocess  Java Source Code 
                +   Compile Java Source Code
                +   Assemble Java Source Code


How reproducible:
Always

Steps to Reproduce:
1.  first write any java program call it whatever.java
2.   now at the command line in the directory of the source file type :  gcj whatever.java
                  or type:  gcj -o whatever whatever.java
3.   THe error will spit out at you.
	

Actual Results:    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function '_start':
  /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text +0x18):  undefined reference to 
                                                                                                              'main'

Expected Results:  The program should have been linked with the standard java library files and the 
executable file should have been created

Additional info:


HERE IS WHAT I CAN DO:
                +  Preprocess  Java Source Code 
                +   Compile Java Source Code
                +   Assemble Java Source Code
BUT:  When I type  <gcj Car.java> on the command line, I get errors
            spit out at me.  HERE IS WHAT THOSE ERRORS LOOK LIKE
  /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function '_start':
  /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text +0x18):  undefined reference to 
                                                                                                              'main'

Comment 1 Jakub Jelinek 2001-08-07 20:31:18 UTC
Please read http://gcc.gnu.org/java/faq.html#4_1