Error when compiling

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 (724 Bytes)
DetectorConstruction.hh (493 Bytes) (784 Bytes)

Look at your .cc file again. C++ is a case-sensitive language.

1 Like

I checked the .cc but no change
the version of geant4 is 4.11.1

Take a close and careful look at line 11 of 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"

 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 “” from your opening post. ( Line “11” is actually line 15 now, @mkelsey :wink: )

1 Like

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 file do you actually define a function with the name Construct. That’s what the error message is telling you.

1 Like

okay, thanks you so much

Please excuse me again for disturbing you, as I am new, I have a problem with the references. (1.6 KB)

PrimaryGeneratorAction.hh (955 Bytes) (361 Bytes) (956 Bytes)
ActionInitialization.hh (413 Bytes)