This is the mail archive of the
mailing list for the GCC project.
Re: Bug: Undefined reference to MAIN__
On Mon, Oct 01, 2001 at 06:20:52PM +0200, Toon Moene wrote:
> Martin Kahlert wrote:
> > This is a new bug (worked on Friday last weak):
> > $ cat t.c
> > int main()
> > $ gcc -c t.c
> > $ g77 -o t t.o f.f
> > /sw/gcc-3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/frtbegin.o: In function `main':
> > /home/kahlert/LOCAL/OBJ-3.1/i686-pc-linux-gnu/libf2c/libF77/../../../../gcc-3.1/libf2c/libF77/main.c:61:
> > undefined reference to `MAIN__'
> > collect2: ld returned 1 exit status
> Yep - my bad. I forgot to check C main programs with Fortran
> subprograms when testing the new shared-libf2c code (there's no such
> code in the regression testsuite - and I'm not sure the regression
> testing harness supports mixed-language tests).
> Unfortunately, it will take some days before I can implement a solution
> - I hope that isn't too much of a problem for you.
Thanks for your reply,
it is no big deal for me, i simply changed to linking with gcc and add a -lg2c.
Nevertheless it should work the other way round, too.
With kind regards,
The early bird catches the worm. If you want something else for
breakfast, get up later.