Bug 51139 - Bad: can't link gcj java source code files Bad: crt1.o undefined reference to main in funct start()
Summary: Bad: can't link gcj java source code files Bad: crt1.o undefined reference ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-07 19:56 UTC by Need Real Name
Modified: 2007-04-18 16:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-08-07 19:56:46 UTC
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.