multiple definition of `MAIN__'

Fabian Braennstroem f.braennstroem@gmx.de
Wed Dec 31 09:08:00 GMT 2003


On Tue, 2003-12-30 at 14:56, Toon Moene wrote:
> Fabian Braennstroem wrote:
> 
> > THAT is the correct error-message:
> > 
> > save_vel.o(.text+0xcd1): In function `MAIN__':
> > : multiple definition of `MAIN__'
> > main.o(.text+0x0): first defined here
> > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `MAIN__' changed from 5155 in main.o to 5 in save_vel.o
> > save_pres.o(.text+0x763): In function `MAIN__':
> > : multiple definition of `MAIN__'
> > main.o(.text+0x0): first defined here
> > collect2: ld returned 1 exit status
> > make: *** [calc_les_03_cube] Error 1
> 
> Ah, this is a slightly different problem.
Sorry, it was a different error which I had before.
>   Somehow, g77 thinks there is 
> a main program in the file save_vel.f - this can happen if you have a 
> single (extraneous) END statement for instance.
Yes, that's it. I had two 'end' and one 'return'. Now it works :-)

> 
> If you can't find the problem, send me (and only me - not the list) the 
> whole file save_vel.f and I'll take a look.
> 
> Cheers,

Thanks a lot and happy new year!
Fabian



More information about the Gcc-help mailing list