[Note: All @ symbols below this line are replaced with (at) to avoid the two user mention cap for new users, when I am not even intentionally mentioning any users.]
Geant4 version: 10.6
operating system and version: windows 10
compiler vendor and version: windows visual studio 2019
I am trying to build and run example B1 by following the installation guide instructions. When I used the command > cmake --build . --config Release | to build the B1 executable file this error occurred as apart of the output:
LINK : fatal error LNK1181: cannot open input file ‘%HOMEPATH%\Geant
4\geant4_10_03_p03-build\BuildProducts\Release\lib\G4Tree.lib’ [%HOMEPATH%\Geant4\B1-build\exampleB1.vcxproj]
I looked in the sub directory %HOMEPATH%\Geant4\geant4_10_03_p03-build\BuildProducts\Release\lib I found a file that had a similar name to G4Tree.lib it was _G4Tree-archive.lib . I changed the _G4Tree-archive.lib filename to G4Tree.lib then ran the > cmake --build . --config Release | command again. An almost identical error came up with a different file name. Instead of G4Tree.lib it was G4GMocren.lib . This error was solved in the same way as the previous error. The cycle of using the command > cmake --build . --config Release | , the cannot open input file error coming up, and then changing the appropriate filename was done five times. On the fifth time however, the error had a filename called G4vis_management.lib . This time the archive file wasn’t present in the sub directory %HOMEPATH%\Geant4\geant4_10_03_p03-build\BuildProducts\Release\lib . The filename that most resembled G4vis_management.lib was _G4visXXX-archive.lib . When the > cmake --build . --config Release | command was used again after changing the _G4visXXX-archive.lib to G4vis_management.lib there were about 100 errors that came up on the command prompt. For the sake of brevity I will only put the first five below. If someone needs to see all of the errors to help fix my problem I can make an edit to this post or post it as a reply to this question.
The five errors:
G4visHepRep.lib(G4HepRepFileViewer.obj) : error LNK2001: unresolved external sy
mbol "public: __cdecl G4VViewer::G4VViewer(class G4VSceneHandler &,int,class G4
String const &)" (??0G4VViewer(at)(at)QEAA(at)AEAVG4VSceneHandler(at)(at)HAEBVG4String(at)(at)(at)Z) [
%HOMEPATH%\Geant4\B1-build\exampleB1.vcxproj]
G4RayTracer.lib(G4RayTracerViewer.obj) : error LNK2001: unresolved external sym
bol “public: virtual __cdecl G4VViewer::~G4VViewer(void)” (??1G4VViewer(at)(at)UEAA(at)X
Z) [%HOMEPATH%\Geant4\B1-build\exampleB1.vcxproj]
G4VRML.lib(G4VRML1FileViewer.obj) : error LNK2001: unresolved external symbol "
public: virtual __cdecl G4VViewer::~G4VViewer(void)" (??1G4VViewer(at)(at)UEAA(at)XZ) [
%HOMEPATH%\Geant4\B1-build\exampleB1.vcxproj]
G4VRML.lib(G4VRML2FileViewer.obj) : error LNK2001: unresolved external symbol "
public: virtual __cdecl G4VViewer::~G4VViewer(void)" (??1G4VViewer(at)(at)UEAA(at)XZ) [
:%HOMEPATH%\Geant4\B1-build\exampleB1.vcxproj]
G4FR.lib(G4DAWNFILEViewer.obj) : error LNK2001: unresolved external symbol "pub
lic: virtual __cdecl G4VViewer::~G4VViewer(void)" (??1G4VViewer(at)(at)UEAA(at)XZ) [
%HOMEPATH%\Geant4\B1-build\exampleB1.vcxproj]
I found two relevent files one is named _G4vis_management-archive.lastbuildstate and the other is called unsuccessfulbuild in the sub-directory %HOMEPATH%\Geant4\geant4_10_03_p03-build\source\visualization\management_G4vis_management-archive.dir\Release_G4vis_m.9D8C33EA.tlog . So it might be the case that the file I need never got built properly. I don’t understand why the files are called archive or not built at all when I tried to follow the installation guide as closely as possible. I do not know how to make more progress towards building and running example B1. Is there a way to fix the files so that I can build and run example B1? Do I have to uninstall and reinstall Geant4? and if so how do I do that?
If someone needs to know what commands I used that led me to this point this question is actually a follow up to my previous question: 'cannot open file' error occurs when attempting to build example B1