Let me guess -- do you compile all the source with one g77
invocation?
I had this problem once, but it went away when I broke up
the compiling & linking; one compile for each subroutine.
g77 pukes mightily when an object is redefined in the same
scope (even if the definitions are identical), but does OK
when linking.
In my experience, anyhow.
Regards,
John
> Hi,
>
> Yet another compiler complaint from g77, I know how to fix the
> problem, but since my colleagues on the sgi platform continue to write
> code in the following way, I have been seeking a linker flag around the
> problem.
>
> The problem is that header files which are included in multiple
> source files have the same common blocks defined. So, when linking
> occurs, the compiler sees common blocks which are multiply
> defined. I've tried to #ifdef my way around this, but this doesn't work
> for linking and requires a "smarter" makefile. I have searched high
> and low in the g77 documentation, but I can't find anything about turning
> off these errors.
>
> A fix is to put all of the common blocks into a single header file
> and include it only once. This is annoying if the code changes and one
> has to modify header files. If anyone knows of a linker flag that can be
> used for turning these errors off, please share it.
>
> Regards,
>
> Jeff
> _____________________________________________________
> Jeffrey McDonald, Florida State jemcdon@fnal.gov
> FNAL MS 352 phone 630-840-3983
> Batavia, IL 60510 fax 630-840-8886
>