LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   why doesn't my fortran program compile?? (https://www.linuxquestions.org/questions/programming-9/why-doesn%27t-my-fortran-program-compile-168932/)

himan 04-11-2004 07:42 PM

why doesn't my fortran program compile??
 
Hi,
I have some Fortran codes and am trying to
compile them using g77 version 2.96 on a linux
machine, but i am getting some error which I am not
able to figure out.

This is what I get when I use
>g77 -e space.f -o space

/usr/bin/ld: warning: cannot find entry symbol
space.f; defaulting to 08048b10
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libg2c.a(main.o):
In function `main':
main.o(.text+0x2a): undefined reference to `MAIN__'
collect2: ld returned 1 exit status

I shall be grateful to anyone who could be of any
assistance.
thanks.

regards,

himan:confused:

lazyboy0001 04-11-2004 10:43 PM

why not just

g77 fortrancode.f -o exename

??
I don't know why you need that -e switch


All times are GMT -5. The time now is 05:28 PM.