It seems the newer aCC compiler A.01.19 (a) requires explicit definition of static data members and (b) has problems with static variables in inline functions. a) Undefined static variables in G4VPhysicalVolume: class G4VPhysicalVolume: //.. private: static G4RotationMatrix aRotM; static G4RotationMatrix IdentityRM; //.. } G4VPhysicalVolume.cc G4RotationMatrix G4VPhysicalVolume::aRotM = G4RotationMatrix(); G4RotationMatrix G4VPhysicalVolume::IdentityRM = G4RotationMatrix(); b) /usr/ccs/bin/ld: Unsatisfied symbols: static_rotM (data) static_currTranslation (data) static_noName (data) gmake: *** [/afs/cern.ch/user/i/ivana/w0/geant4/bin/HP-aCC/exampleN02] Error 1 The remaining local static variables are in: G4TouchableHistory - rotM, currTranslation G4ParticleTable, G4VDecayChannel, G4ParticleMessenger - noName
The compiler in question is aCC 1.21 (not 1.19 as stated below).
> 3) Ivana, do I understand that to solve the problem you also made > rotM, currTranslation and noName into data members in order to fix > the problem? If this is so, then if aRotM and IdentityRM are > properly defined *and* rotM, currTranslation and noName *still* > show up as unresolved then I'm sure there is a compiler bug. > > I will enter this into our Problem Report System for John Apostolakis > to look at when he returns. Yes. It really seems to be a compiler bug: I tried to add this code in .cxx and then in .h file (into a member function): // test static G4ThreeVector currTranslation; currTranslation = G4ThreeVector(); In case of .cxx it compiles & links ok; in case of .h it gives unsatisfied symbol.
It looks to be a compiler bug.
The original code simply had static variables an inline method. This method has now been moved to the src directory, and is no longer inlined. In this way the code is improved and the new compiler will also be helped/saved.