Okay, so I rewrote 'obj2.c' in the directory so that it had int a=3; outside of the various classes etc. I added it to one of the numbers being sent out an outlet, put in a line 'a= a + 1; and that augments the result every time I send my mutant obj2 a number via the right inlet, fine.
If I make that a 'static int a = 3;' then I can make a pair of obj2's and it's the same 'a' ; every time I tickle the right inlet of either one the result increases by one and when I switch to the other 'obj2' this continues to work.
Now when I also write obj6.c (which was identical except for having 6 replacing 2 throughout, I can compile this and make obj6's.
Two of these will also share the same 'a' and augment it with a tweak to either one's inlet... but this has (of course! -- right?) no effect on the 'a' shared between two obj2's on the same patch. They keep on augmenting their 'a' but it's a different number.
How to add a truly global variable to a pd external? (outside of lua extensions, where it seems to be a simple matter of leaving out the 'self.'s )
?