Error: ld returned 1 exit status

Hi
What does this error mean?

It likely means there’s no implementation of the B1DetectorConstruction::ConstructSDandField() member function in either B1DetectorConstruction.h or B1DetectorConstruction.cc. If these have been copied from the basic example, check to see what modifications have been made such as deleting that implementation.