c++ and RedHat Linux 5.1

c++ and RedHat Linux 5.1

Post by Michael Zuidervee » Sun, 15 Nov 1998 04:00:00



Hi,
I'm trying to compile a simple c++ program-- your typical "Hello World"
program (I've also tried multiple other simple programs) using egcs 1.0.2
under RH Linux 5.1 (alpha). Regardless of what source file I try to compile
I consistently get the following error message, everytime.

/usr/lib/crt1.o: In function '_start':
../sysdeps/alpha/elf/start.S: 77: undefined reference to 'main'
..sysdeps/alpha/elf/start.S: 77: undefined reference to 'main'
collect2: ld returned 1 exit status

Compilation exited abnormally with code1 at Wed Nov 11 23:08:12

Anybody have any Ideas what's going on???

Mike Zuiderveen

 
 
 

c++ and RedHat Linux 5.1

Post by acoli.. » Tue, 24 Nov 1998 04:00:00


a program listing would help but it seems that you have simply left out the
main(){} function required to start the application... Take another look at
your book..

> Hi,
> I'm trying to compile a simple c++ program-- your typical "Hello World"
> program (I've also tried multiple other simple programs) using egcs 1.0.2
> under RH Linux 5.1 (alpha). Regardless of what source file I try to compile
> I consistently get the following error message, everytime.

> /usr/lib/crt1.o: In function '_start':
> ../sysdeps/alpha/elf/start.S: 77: undefined reference to 'main'
> ..sysdeps/alpha/elf/start.S: 77: undefined reference to 'main'
> collect2: ld returned 1 exit status

> Compilation exited abnormally with code1 at Wed Nov 11 23:08:12

> Anybody have any Ideas what's going on???

> Mike Zuiderveen



 
 
 

1. c++ and RedHat Linux 5.1

Hi,
I'm trying to compile a simple c++ program-- your typical "Hello World"
program (I've also tried multiple other simple programs) using egcs 1.0.2
under RH Linux 5.1 (alpha). Regardless of what source file I try to compile
I consistently get the following error message, everytime.

/usr/lib/crt1.o: In function '_start':
../sysdeps/alpha/elf/start.S: 77: undefined reference to 'main'
..sysdeps/alpha/elf/start.S: 77: undefined reference to 'main'
collect2: ld returned 1 exit status

Compilation exited abnormally with code1 at Wed Nov 11 23:08:12

Anybody have any Ideas what's going on???

Mike Zuiderveen

2. info on STREAMS

3. upgrade from Redhat Linux 5.0 to redhat linux 5.1

4. ThinkPad display setup for RH5

5. gcc/C++ problems in RedHat 5.1

6. Bad upgrade renders machine immune to linux :(

7. Sun forte C++ 5.1 vs C++ 4.2

8. xdpyinfo, xwininfo, xv application crash

9. RedHat Linux 5.1 vs Linux for PPC's

10. Suse Linux 5.3 or Redhat 5.1 for a Linux Virgin?

11. RedHat 5.0 to RedHat 5.1

12. If REDHAT is listening, suggestions for Redhat 5.1

13. Redhat 5.0 --> Redhat 5.1