I had an a figure in geant4, but I am still a novice, I seek your expertise to help me solve my problem
Thank you Best regards
Look at your .cc file again. C++ is a case-sensitive language.
I checked the .cc but no change
the version of geant4 is 4.11.1
THANKS
Take a close and careful look at line 11 of DetectorConstruction.cc. You will see your mistake, immediately after the second colon.
please can you frame me the place?
this post here is a good read:
okay, please help me
#include "DetectorConstruction.hh"
#include "G4RunManager.hh"
#include "G4NistManager.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4SystemOfUnits.hh"
#include "globals.hh"
#include "G4Box.hh"
#include "G4VPhysicalVolume.hh"
DetectorConstruction::DetectorConstruction()
{}
DetectorConstruction::~DetectorConstruction()
{}
G4VPhysicalVolume* DetectorConstruction::constrcut()
{
G4NistManager* ext = G4NistManager::Instance();
G4Material* elm = ext->FindOrBuildElement("G4_Fe");
G4Box* EQF=new G4Box("coke",235.*mm,140.*mm,0.*mm);
G4LogicalVolume* logicEQF=new G4LogicalVolume(EQF,elm,"logicEQF");
G4VPhysicalVolume* physEQF=new G4PVPlacement(nullptr,G4ThreeVector(0.,0.,0.),logicEQF,"physEQF",nullptr,false,0,true);
return physEQF;
}
this is the content of “DetectorConstruction.cc” from your opening post. ( Line “11” is actually line 15 now, @mkelsey )
Look at the string after the “::” (that character is called “colon” in American English). That is not the word Construct
, which is what it is supposed to be. Nowhere in your DetectorConstruction.cc file do you actually define a function with the name Construct
. That’s what the error message is telling you.
okay, thanks you so much
Please excuse me again for disturbing you, as I am new, I have a problem with the references.
EXPLE.cc (1.6 KB)
PrimaryGeneratorAction.hh (955 Bytes)
ActionInitialization.cc (361 Bytes)
PrimaryGeneratorAction.cc (956 Bytes)
ActionInitialization.hh (413 Bytes)