How do I add antiprotons to a particle generator?

Hello!
I added the G4AntiProton.hh file to a code in geant4 and using particleTable->FindParticle(“antiproton”) added it to a file but the terminal outputs core dump. Maybe there is a different way to add this particle? What do I do?