Hi,
I tried to compile ROOT 6.22.02 with my Visual Studio 2019 (Win32) and I hit an issue. I am wondering whether it is not linked to the VC Tool set version I am using.
I get the following error message:
Generating G__Core.cxx, ../bin/libCore.rootmap
In file included from input_line_5:1:
In file included from D:/S/ROOT-6.22.0.2/BUILD/root/include\Rtypes.h:189:
In file included from D:/S/ROOT-6.22.0.2/BUILD/root/include/TGenericClassInfo.h:21:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\\include\vector:11:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\\include\xmemory:16:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\\include\xutility:15:
117>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\\include\utility(138,9): error G08EB1F86: expected member name or ';' after declaration specifiers [D:\S\ROOT-6.22.0.2\BUILD\root\core\G__Core.vcxproj]
!conjunction_v<_Is_implicitly_default_constructible<_Uty1>, _Is_implicitly_default_constructible<_Uty2>>)
^
117>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\\include\utility(138,9): error GC66A3811: expected ')' [D:\S\ROOT-6.22.0.2\BUILD\root\core\G__Core.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\\include\utility:137:23: note: to match this '('
constexpr explicit(
Is this a know issue, Do I have to use some other VC Tool set version ?
Which VC Tool version was used to build official ROOT Windows version ?
thanks.
_ROOT Version: 6.22.02
_Platform: Windows
_Compiler: Visual Studio 2019 Win32
Usually yes, but I mostly use the master branch. I didn’t try 6.24.00 with the latest version of Visual Studio. I will try once back at work next month
OK. it compiles like a charm with 6.24.00 . Note, that even if it compile well, I can see in the CMakeList.txt file that you reset the PATH, whic is error prone.
Instead of
add_custom_command(OUTPUT tutorials/hsimple.root
COMMAND set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
I would naively have expected to have:
add_custom_command(OUTPUT tutorials/hsimple.root
COMMAND set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY};$ENV{${PATH}}
I do have an additional comment:
I noticed that if the INCLUDE environment variable is set ( INCLUDE environment variable describes the location of the C and C++ header files), I get these error messages when starting ROOT. There seems to be a collision with the ROOT interpreter.
Given that this environment variable is used only at build time, I can simply reset it in the final setup environment script. Fine.
But I wonder, whether there is some smarter solution to avoid this workaround. Is this a known issue (I need to check if this occurs on Linux as well) Note that the issue can be reproduced with official ROOT windows archive. It does not occur on Linux. Wondering whether there is not something behind for windows.
D:\S>set INCLUDE=bla
D:\S>root --version
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
^~~~~
Replaced symbol atexit cannot be found in JIT!
Replaced symbol at_quick_exit cannot be found in JIT!
Replaced symbol __dllonexit cannot be found in JIT!
Replaced symbol _onexit cannot be found in JIT!
input_line_3:37:10: fatal error: 'string' file not found
#include <string>
^~~~~~~~
ROOT Version: 6.24/00
Built for win32 on Apr 14 2021, 14:33:50
From tags/v6-24-00@v6-24-00
D:\S>set INCLUDE=
D:\S>root --version
ROOT Version: 6.24/00
Built for win32 on Apr 14 2021, 14:33:50
From tags/v6-24-00@v6-24-00