Correct or Not or Old-fashioned or Bug

Mike Gorodnitzky mikegord at generic.UUCP
Tue May 21 10:39:27 AEST 1991


There seems to be one problem that may prevent compiling, or rather, linking.

The problem is that because the variable 'i' is declared in several modules (4),the linker will choke as it is illegal to do this.  It will have global's called'i' conflicting with each other.  This is bad.

What you may want to do is declare in:

pro_all.h---------

     extern int  i;

pro_main.c--------

     int  i;


And keep the rest as is.  I haven't actually tried this, so can't be 100% sure about it, but it should work ok.




More information about the Comp.lang.c mailing list