You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I have installed Geant4 and its dependences in my Ubuntu 22.04 machine with Python 3.10.6. Now, I am trying to integrate it with DAGMC. But I am getting compile errors.
Consolidate compiler generated dependencies of target DagGeant4
[ 81%] Building CXX object src/geant4/app/CMakeFiles/DagGeant4.dir/exampleN01.cc.o
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc: In function ‘int main(int, char**)’:
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:82:5: error: ‘G4UIExecutive’ was not declared in this scope
82 | G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
| ^~~~~~~~~~~~~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:82:20: error: ‘ui’ was not declared in this scope
82 | G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
| ^~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:82:29: error: expected type-specifier before ‘G4UIExecutive’
82 | G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
| ^~~~~~~~~~~~~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:85:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
85 | delete ui;
| ^~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:87:5: error: ‘G4VisManager’ was not declared in this scope; did you mean ‘G4VPCManager’?
87 | G4VisManager* visManager = new G4VisExecutive;
| ^~~~~~~~~~~~
| G4VPCManager
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:87:19: error: ‘visManager’ was not declared in this scope; did you mean ‘UImanager’?
87 | G4VisManager* visManager = new G4VisExecutive;
| ^~~~~~~~~~
| UImanager
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:87:36: error: ‘G4VisExecutive’ does not name a type
87 | G4VisManager* visManager = new G4VisExecutive;
| ^~~~~~~~~~~~~~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:90:5: error: ‘G4UIExecutive’ was not declared in this scope
90 | G4UIExecutive* UI = new G4UIExecutive(argc, argv);
| ^~~~~~~~~~~~~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:90:20: error: ‘UI’ was not declared in this scope
90 | G4UIExecutive* UI = new G4UIExecutive(argc, argv);
| ^~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:90:29: error: expected type-specifier before ‘G4UIExecutive’
90 | G4UIExecutive* UI = new G4UIExecutive(argc, argv);
| ^~~~~~~~~~~~~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:94:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
94 | delete visManager;
| ^~~~~~~~~~
/opt/nuclear-boy/dagmc-repo/src/geant4/app/exampleN01.cc:95:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
95 | delete UI;
| ^~
make[2]: *** [src/geant4/app/CMakeFiles/DagGeant4.dir/build.make:76: src/geant4/app/CMakeFiles/DagGeant4.dir/exampleN01.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1477: src/geant4/app/CMakeFiles/DagGeant4.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
This error message is indicating that the compiler encountered errors while attempting to build the exampleN01.cc file of a Geant4 application. Specifically, there are several errors related to undefined types and undeclared variables, which suggests that the necessary Geant4 header files and libraries may not have been properly included.
The first error indicates that the type G4UIExecutive was not declared in the current scope. This could indicate that the header file which defines this type was not properly included at the beginning of the source file.
Similarly, the second error indicates that the variable ui was not declared in the current scope, which suggests that the type of ui may also be undefined or not properly declared.
The text was updated successfully, but these errors were encountered:
Thanks for this update. We do have an active PR #803 that was an upgrade to be compatible with v10. If you are interested/able/have time, we'd love an assessment of whether this also fixes for newer versions of Geant4. (tagging @helen-brooks )
Recently, I have installed Geant4 and its dependences in my Ubuntu 22.04 machine with Python 3.10.6. Now, I am trying to integrate it with DAGMC. But I am getting compile errors.
commands:
Log:
This error message is indicating that the compiler encountered errors while attempting to build the
exampleN01.cc
file of a Geant4 application. Specifically, there are several errors related to undefined types and undeclared variables, which suggests that the necessary Geant4 header files and libraries may not have been properly included.The first error indicates that the type
G4UIExecutive
was not declared in the current scope. This could indicate that the header file which defines this type was not properly included at the beginning of the source file.Similarly, the second error indicates that the variable
ui
was not declared in the current scope, which suggests that the type ofui
may also be undefined or not properly declared.The text was updated successfully, but these errors were encountered: