INstallation on Windows 11 with Visual Studio 2022 - Issue with Configuration

Dear All,

I’ve installed Geant4 v.11.3.2 on Windows 11 a first time and it seems it went well. But as I wanted to install it again so it can take into account the G4DATA, it failed.

To do so, I’ve first deleted the contain of the build directory and install directory, as I read it in an old post. And then I’ve started again the configuration with CMake according to Geant4 Installation Guide and obtained some errors. Hereafter is the copy of what I’ve obtained as error message at the end of the output after launching “cmake -DCMAKE_INSTALL_PREFIX=..\geant4-v11.3.2-install ..\geant4-v11.3.2”:

CMake Error at cmake/Modules/G4ConfigurePkgConfigHelpers.cmake:381 (file):
file RELATIVE_PATH called with incorrect number of arguments
Call Stack (most recent call first):
cmake/Modules/G4CMakeMain.cmake:94 (include)
CMakeLists.txt:49 (include)

– The following Geant4 features are enabled:
CMAKE_CXX_STANDARD: Compiling against C++ Standard ‘17’
GEANT4_BUILD_MULTITHREADED: Build multithread enabled libraries

– Configuring incomplete, errors occurred!
PS C:\Users\jerom\Geant4\geant4-v11.3.2-build>

I’m not really familiar with VS and CMake. In fact I’m an old Geant4 user and the last time I’ve installed it and used it it was about 10 years ago on Linux :sweat_smile: .

Thank you for any help

Geant4 Version: 11.3.2
Operating System: Windows 11
Compiler/Version: VS 2022, C/C++ version 19.44.35215
CMake Version: cmake version 3.31.6-msvc6


Hey Jerome, your command looks fine syntactically. That error usually comes from an extra space after = or a stale CMakeCache.txt from a previous run. Try from a clean build folder, that typically fixes it.

Hi! Sounds weird, but OK I’ll try delete all and start a clean installation from the beginning.

Thanks.

OK, I’ve just understood why it didn’t work last time and also right now while restarting installation from scratch: I’ve forgotten to put the paths into “ “ in the cmake command :face_with_steam_from_nose:

Well, always respect the f*** manual :sweat_smile: :flushed_face:

1 Like