Geant4 visualization problem

Goodmorning,

I’m simulating a particle (mu+) passing throught a layer of salty water. I created the detector, the physics list and the primary generator action classes and it worked. Then I wanted to visualize it and i copied the last part of the main.cc of the example B1 from Geant depository. The problem is that I’m getting this error:

"C:\Users\Anita\Desktop\Tesi\2-versione\main.cc(29,63): error C2664: ‘void G4RunManager::SetUserInitiali
zation(G4VUserDetectorConstruction *)’: impossibile convertire l’argomento 1 da ‘PrimaryGeneratorAction
*’ a ‘G4VUserDetectorConstruction *’ [C:\Users\Anita\Desktop\Tesi\2-versione\build\main.vcxproj]
C:\Users\Anita\Desktop\Tesi\2-versione\main.cc(29,61): message : I tipi a cui si punta sono privi di re
lazioni. La conversione richiede reinterpret_cast, cast di tipo C o cast di tipo funzione [C:\Users\Ani
ta\Desktop\Tesi\2-versione\build\main.vcxproj]
C:\Users\Anita\Documents\GEANT4\source\include\Geant4\G4RunManager.hh(392,16): message : vedere la dich
iarazione di ‘G4RunManager::SetUserInitialization’ [C:\Users\Anita\Desktop\Tesi\2-versione\build\main.v
cxproj] "

Any idea on how to solve it? Or also if there is any other way with which is possible to visualize the event starting from the detector, physics list and primary action generator classes?

Thanks, Anita