Compiling FORTRAN into Linux

Hello,

I use Linux on Ubuntu 12.04.

I have a fortran script with extension .f and I want to compile it to an executable file in linux.

I have used this command:

f77 -o snp_hwe.exe snp_hwe.f

But I receive this error:

(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status

I have no idea what this means, please help me on this.

---------- Post updated at 10:30 AM ---------- Previous update was at 10:29 AM ----------

By the way, this is the beginning of my program:

FUNCTION SNPHWE(N_HET, N_HOM1, N_HOM2, MAXHET) 
C 
C 
      DATA       KIN, KOUT /5,6/ 
      INTEGER    N_ALLR, N_ALL
      INTEGER    N_GENO 
      INTEGER    MIDPT
      INTEGER    C_HET, C_HOMR, C_HOMC 
      REAL*8     SNPHWE, PVALUE, SUM
      REAL*8     PROBS(MAXHET)
      REAL*8     PREV

main is the function where your program begins when run. If it doesn't have one, it can't run.

".exe" is Windows, by the way. Linux/UNIX don't use it.