Extern struct in C

2.1k Views Asked by At

I have a C file generated with f2c (Fortran to C translator) that contains the following C structure:

struct {
    real rez, pi, st;
} const_;

How can I declare this const_ variable as an external in another .c file without modifying the one generated by f2c?

1

There are 1 best solutions below

0
On BEST ANSWER

In another file.

extern struct {
    real rez, pi, st;
} const_;