Bug 51139 - Bad: can't link gcj java source code files Bad: crt1.o undefined reference to main in funct start()
Bad: can't link gcj java source code files Bad: crt1.o undefined reference ...
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-07 15:56 EDT by Need Real Name
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-07 15:56:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-08-07 15:56:40 EDT
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 16:31:18 EDT
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.