Greetings. I'm not much of a fortran programmer so I'm throwing myself on the mercy of the forum. I was given a program that compiles on Compaq Fortran. It also compiles on Sun's fussy compiler when IEEE flags are included. When I invoke the makefile on a vanilla build of FC3 all the objects below compile fine and then during the last step I get the following:
f77 -g -C -o fm97 z3.o initl.o solar.o init_w.o weathr.o solwat.o books.o grow.o regen.o mortal.o decomp.o dsmf.o dtf.o duffrf.o aggprt.o gridprt.o quadrat.o grid.o dla.o height.o aleaf.o awood.o twood.o bole.o branch.o dbranch.o bark.o croot.o froot.o dinco.o alf.o drtf.o fertf.o gddf.o amort.o smort.o init_f.o dyear.o burn.o fmoist.o firefx.o intens.o herb.o bulk.o harvest.o fixfuels.o firekill.o rebooks.o fprint.o fmort.o ran1.o ran2.o ran3.o ran4.o ran5.o ran6.o ran7.o ran8.o gauss1.o gauss2.o gamma.o
init_w.o(.data+0x0): In function `init_w__':
/home/rsgis/facet/fm_97.5/src/init_w.f:3: multiple definition of `site_'
initl.o(.data+0x0):/home/rsgis/facet/fm_97.5/src/initl.f:4: first defined here
collect2: ld returned 1 exit status
make: *** [fm97] Error 1
The name it's complaining about (SITE) exists only as the name of a common block. So what's the source of the complaint? I tried replacing all the include statements with the contents of the include files and got the same error. I tried a local f77 programmer who was stumped. Any thoughts appeciated and I'd be delighted (!) to send a tarball of the code to anybody who is willing to look into this.
I remain, with the greatest respect, your most humble and
obedient servant, etc. etc.
Doc
f77 -g -C -o fm97 z3.o initl.o solar.o init_w.o weathr.o solwat.o books.o grow.o regen.o mortal.o decomp.o dsmf.o dtf.o duffrf.o aggprt.o gridprt.o quadrat.o grid.o dla.o height.o aleaf.o awood.o twood.o bole.o branch.o dbranch.o bark.o croot.o froot.o dinco.o alf.o drtf.o fertf.o gddf.o amort.o smort.o init_f.o dyear.o burn.o fmoist.o firefx.o intens.o herb.o bulk.o harvest.o fixfuels.o firekill.o rebooks.o fprint.o fmort.o ran1.o ran2.o ran3.o ran4.o ran5.o ran6.o ran7.o ran8.o gauss1.o gauss2.o gamma.o
init_w.o(.data+0x0): In function `init_w__':
/home/rsgis/facet/fm_97.5/src/init_w.f:3: multiple definition of `site_'
initl.o(.data+0x0):/home/rsgis/facet/fm_97.5/src/initl.f:4: first defined here
collect2: ld returned 1 exit status
make: *** [fm97] Error 1
The name it's complaining about (SITE) exists only as the name of a common block. So what's the source of the complaint? I tried replacing all the include statements with the contents of the include files and got the same error. I tried a local f77 programmer who was stumped. Any thoughts appeciated and I'd be delighted (!) to send a tarball of the code to anybody who is willing to look into this.
I remain, with the greatest respect, your most humble and
obedient servant, etc. etc.
Doc