Oops. I was wrong. There isn't a repeat data statement in the code I'm trying to work with. So, disregard the post above. I'm still totally lost! I just know that site_ is being defined multiple times and can't figure out where. If anybody wants to try the code and save me from putting my head...
Ok. I've found the problem. I found a multiple declaration using data in two subroutines.
Reworking the previous example, this is what is happening.
This is the cblk.inc file:
common /cblk/j
This is the callee.f file:
subroutine usecom
include 'cblk.inc'
data j /5/...
Yes. That works for me too. Following the syntax of the makefile I'm trying to use:
g77 -c -o callee.o callee.f
g77 -c -o caller.o caller.f
g77 -o caller caller.o callee.o
And nm doesn't return anything with symbol D which is what is supposed to happen
nm *.o | grep D
I have to go out...
Ah ha. Is this it?
18. Known Causes of Trouble with GNU Fortran
18.4.2 Multiple Definitions of External Names
g77 doesn't allow a common block and an external procedure or BLOCK DATA to have the same name. Some systems allow this, but g77 does not, to be compatible with f2c.
Thanks so much for replying!
1) I think SITE is already a named common block. The include file that names SITE looks like this:
c Site variables for FACET version 97.5, included in Z3.INC.
COMMON/SITE/ xtree, area, ps, dlat, slope, aspect, elev,
2 mdelta, xk, theta, phi...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.