OpNovice Example

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

Geant4 Version: 11.01
Operating System: Ubuntu 20.04
_Compiler/Version:_9.4.0
CMake Version: 3.20
Hello good day forum. iam trying to run OpNovice Example but iam experiencing this error please guide me.

Consolidate compiler generated dependencies of target OpNovice
[  7%] Building CXX object CMakeFiles/OpNovice.dir/src/OpNoviceDetectorConstruction.cc.o
/home/bashrano/Bash/Exercise/G4V11/OpNovice_fro_Test/OpNovice/src/OpNoviceDetectorConstruction.cc: In member function ‘virtual G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()’:
/home/bashrano/Bash/Exercise/G4V11/OpNovice_fro_Test/OpNovice/src/OpNoviceDetectorConstruction.cc:320:5: error: ‘G4GDMLParser’ was not declared in this scope
  320 |     G4GDMLParser* parser = new G4GDMLParser();
      |     ^~~~~~~~~~~~
/home/bashrano/Bash/Exercise/G4V11/OpNovice_fro_Test/OpNovice/src/OpNoviceDetectorConstruction.cc:320:19: error: ‘parser’ was not declared in this scope
  320 |     G4GDMLParser* parser = new G4GDMLParser();
      |                   ^~~~~~
/home/bashrano/Bash/Exercise/G4V11/OpNovice_fro_Test/OpNovice/src/OpNoviceDetectorConstruction.cc:320:32: error: expected type-specifier before ‘G4GDMLParser’
  320 |     G4GDMLParser* parser = new G4GDMLParser();
      |                                ^~~~~~~~~~~~
make[2]: *** [CMakeFiles/OpNovice.dir/build.make:104: CMakeFiles/OpNovice.dir/src/OpNoviceDetectorConstruction.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/OpNovice.dir/all] Error 2
make: *** [Makefile:136: all] Error 2


Just to confirm from your flag of the post that you managed to solve this?

Yes, iam manage to solve it thank you

1 Like