Building root v6.26.02, MSVC and SDK versions

_ROOT Version: 6.26.02

Hello,

What Visual Studio, MSVC compiler and SDK I should have to build root from source?
Early I tried root 6.24, and now I have the same probelms with 6.26. I have problem with redifinition in “corecrt.h” If I use pre-built binary 6.24, It’s the same as here Windows ROOT problem. And I still have the problem that I mentioned here Build root from source, Windows, v-6.24.06, error MSB6006.

Maybe someone can find the reason of problem analyzing the output of configuring:

C:\home\program_files\root\build_v6.26.02>cmake -G"Visual Studio 16 2019" -A Win32 -Thost=x64 -DCMAKE_INSTALL_PREFIX=C:\home\program_files\root\root_v6.26.02 -DCMAKE_INSTALL_LIBDIR=lib/root -DCMAKE_INSTALL_INCLUDEDIR=include\root -DCMAKE_INSTALL_SYSCONFDIR=etc/root -DCMAKE_INSTALL_DATAROOTDIR=share -DFFTW_INCLUDE_DIR="C:\Program Files\vcpkg\installed\x86-windows" -DFFTW_LIBRARY="C:Program Files\vcpkg\lib\installed\x86-windows\fftw3.lib" -DCMAKE_Python3_ROOT_DIR=C:\Users\nazar\AppData\Local\Programs\Python\Python39-32 -DPYTHON_EXECUTABLE=C:\Users\nazar\AppData\Local\Programs\Python\Python39-32\python.exe -DZLIB_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\zlib.lib" -DZLIB_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include" -DGIF_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\giflib.lib" -DGIF_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include" -DPNG_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\libpng.lib" -DPNG_PNG_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include" -DJPEG_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\jpeg.lib" -DJPEG_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include" -DTIFF_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\libtiff.lib" -DTIFF_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include" -DGSL_ROOT_DIR="C:\Program Files\vcpkg\installed\x86-windows" -Dbuiltin_freetype=ON -Dgnuinstall=ON -Dbuiltin_zlib=ON -Dminuit2=ON C:\home\program_files\src\root_v6.26.02
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19044.
-- The C compiler identification is MSVC 19.29.30143.0
-- The CXX compiler identification is MSVC 19.29.30143.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.31.1.windows.1")
-- Detected ROOT_VERSION 6.26.02
-- Checking internet connectivity...
-- Yes
-- Looking for Python
-- Found Python3: C:\Users\nazar\AppData\Local\Programs\Python\Python39-32\python.exe (found version "3.9.5") found components: Interpreter Development NumPy Development.Module Development.Embed
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Performing Test GLIBCXX_USE_CXX11_ABI
-- Performing Test GLIBCXX_USE_CXX11_ABI - Failed
-- ROOT Platform: win32
-- ROOT Compiler: MSVC 19.29.30143.0
-- ROOT Processor: AMD64
-- ROOT Architecture: win32
-- Build Type: '' (flags = '')
-- Compiler Flags: -nologo -IC:/home/program_files/src/root_v6.26.02/build/win -FIw32pragma.h -FIsehmap.h -Zc:__cplusplus -std:c++17 -MD -GR -EHsc- -W3 -wd4141 -wd4291 -wd4244 -wd4049 -wd4146 -D_WIN32  -D_XKEYCHECK_H -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING -D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
-- ROOT default compression algorithm: zlib
-- PyROOT will be built for version 3.9.5
-- Looking for nlohmann/json.hpp
-- nlohmann/json.hpp not found. Switching on builtin_nlohmannjson option
-- Building freetype version 2.6.1 included in ROOT itself
-- Looking for PCRE
-- Could NOT find PCRE (missing: PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY)
-- PCRE not found. Switching on builtin_pcre option
-- Looking for LZMA
-- Could NOT find LibLZMA (missing: LIBLZMA_LIBRARY LIBLZMA_INCLUDE_DIR LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET)
-- LZMA not found. Switching on builtin_lzma option
-- Building LZMA version 5.2.4 included in ROOT itself
-- Looking for xxHash
-- Could NOT find xxHash (missing: xxHash_LIBRARY xxHash_INCLUDE_DIR)
-- xxHash not found. Switching on builtin_xxhash option
-- Looking for ZSTD
-- Could NOT find ZSTD (missing: ZSTD_LIBRARIES ZSTD_INCLUDE_DIR ZSTD_VERSION)
-- ZSTD not found. Switching on builtin_zstd option
-- Performing Test C_FLAG_MP
-- Performing Test C_FLAG_MP - Success
-- Performing Test CXX_FLAG_MP
-- Performing Test CXX_FLAG_MP - Success
-- Performing Test C_FLAG_D_UNICODE
-- Performing Test C_FLAG_D_UNICODE - Success
-- Performing Test CXX_FLAG_D_UNICODE
-- Performing Test CXX_FLAG_D_UNICODE - Success
-- Performing Test C_FLAG_DUNICODE
-- Performing Test C_FLAG_DUNICODE - Success
-- Performing Test CXX_FLAG_DUNICODE
-- Performing Test CXX_FLAG_DUNICODE - Success
-- Looking for LZ4
-- Could NOT find LZ4 (missing: LZ4_LIBRARY LZ4_INCLUDE_DIR)
-- LZ4 not found. Switching on builtin_lz4 option
-- Performing Test GIF_GifFileType_UserData
-- Performing Test GIF_GifFileType_UserData - Success
-- Found GIF: C:/Program Files (x86)/GnuWin32/lib/giflib.lib (found version "4")
-- Found TIFF: C:\Program Files (x86)\GnuWin32\lib\libtiff.lib (found version "3.8.2")
-- Found PNG: C:\Program Files (x86)\GnuWin32\lib\libpng.lib (found version "1.2.37")
-- Found JPEG: C:\Program Files (x86)\GnuWin32\lib\jpeg.lib (found version "62")
-- Looking for AfterImage
-- Could NOT find AfterImage (missing: AFTERIMAGE_INCLUDE_DIR AFTERIMAGE_LIBRARIES)
-- AfterImage not found. Switching on builtin_afterimage option
-- Looking for GSL
-- Found GSL: C:/Program Files/vcpkg/installed/x86-windows/include (found suitable version "7.1", minimum required is "1.10")
-- Looking for OpenGL
-- Found OpenGL: opengl32
-- Looking for GLEW
-- Could NOT find GLEW (missing: GLEW_INCLUDE_DIRS GLEW_LIBRARIES)
-- GLEW not found. Switching on builtin_glew option
-- Looking for gl2ps
-- Could NOT find gl2ps (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR)
-- gl2ps not found. Switching on builtin_gl2ps option
-- Looking for LibXml2
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-- LibXml2 not found. Switching off xml option
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Switching OFF 'ssl' option.
-- Looking for MySQL
-- Could NOT find MySQL (missing: MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
-- MySQL not found. Switching off mysql option
-- Looking for Oracle
-- Oracle not found.
-- Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
--    currently found includes:
-- Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
--    currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
-- Oracle not found. Switching off oracle option
-- Looking for PostgreSQL
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR)
-- PostgreSQL not found. Switching off pgsql option
-- Looking for SQLite
-- Could NOT find Sqlite (missing: SQLITE_INCLUDE_DIR SQLITE_LIBRARIES)
-- SQLite not found. Switching off sqlite option
-- Looking for Pythia6
-- Pythia6 not found. Switching off pythia6 option
-- Looking for Pythia8
-- Could NOT find Pythia8 (missing: PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
-- Pythia8 not found. Switching off pythia8 option
-- Looking for FFTW3
-- Looking for CFITSIO
-- Could NOT find CFITSIO (missing: CFITSIO_LIBRARY CFITSIO_INCLUDE_DIR)
-- CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'
--                    For the time being switching off 'fitsio' option
-- Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARY)
-- GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
                      and the variable SRM_IFCE_DIR to the srm_ifce installation
-- For the time being switching OFF 'gfal' option
-- Could NOT find FTGL (missing: FTGL_INCLUDE_DIR FTGL_LIBRARY)
-- ftgl library not found. Set variable FTGL_ROOT_DIR to point to your installation
-- For the time being switching ON 'builtin_ftgl' option
-- Looking for TBB
-- Could NOT find TBB (missing: TBB_ROOT_DIR TBB_INCLUDE_DIR TBB_LIBRARY) (Required is at least version "2018")
-- TBB not found, enabling 'builtin_tbb' option
-- Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored
-- Looking for BLAS for optional parts of TMVA
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Could NOT find BLAS (missing: BLAS_LIBRARIES)
-- Using GSL CBLAS for optional parts of TMVA
-- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Building LLVM in 'Release' mode.
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x86/cl.exe
-- Could NOT find Z3: Found unsuitable version "0.0.0", but required is at least "4.7.1" (found Z3_LIBRARIES-NOTFOUND)
-- Looking for backtrace
-- Looking for backtrace - not found
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM host triple: i686-pc-windows-msvc
-- LLVM default target triple: i686-pc-windows-msvc
-- Found PythonInterp: C:/Users/nazar/AppData/Local/Programs/Python/Python39-32/python.exe (found version "3.9.5")
-- Constructing LLVMBuild project information
-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting X86
-- Targeting NVPTX
-- Clang version: 9.0.1
-- PrintFunctionNames ignored -- Loadable modules not supported on this platform.
-- AnnotateFunctions ignored -- Loadable modules not supported on this platform.
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- Cling version (from VERSION file): ROOT_1.0~dev
-- Performing Test CXX_HAS_fno_rtti
-- Performing Test CXX_HAS_fno_rtti - Failed
-- Performing Test C_HAS_Wno_strict_overflow
-- Performing Test C_HAS_Wno_strict_overflow - Failed
-- Performing Test C_HAS_Wno_maybe_uninitialized
-- Performing Test C_HAS_Wno_maybe_uninitialized - Failed
-- Performing Test C_HAS_Wno_parentheses_equality
-- Performing Test C_HAS_Wno_parentheses_equality - Failed
-- Looking for m
-- Looking for m - not found
-- Performing Test GCC_HAS_BIDI_CHARS_FLAG
-- Performing Test GCC_HAS_BIDI_CHARS_FLAG - Failed
-- Performing Test found_setresuid
-- Performing Test found_setresuid - Failed
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Success
-- Performing Test found_stod_stringview
-- Performing Test found_stod_stringview - Failed
-- Performing Test found_opplusequal_stringview
-- Performing Test found_opplusequal_stringview - Success
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Success
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Success
-- Performing Test found_stdindexsequence
-- Performing Test found_stdindexsequence - Success
-- Performing Test found_attribute_always_inline
-- Performing Test found_attribute_always_inline - Failed
-- Performing Test has_found_attribute_noinline
-- Performing Test has_found_attribute_noinline - Failed
-- Performing Test found_hardware_interference_size
-- Performing Test found_hardware_interference_size - Failed
-- ROOT Configuration

System          Windows-10.0.19044
Processor       4 core 2112 MHz GenuineIntel Unknown P6 family (AMD64)
Build type
Install path    C:/home/program_files/root/root_v6.26.02
Compiler        MSVC 19.29.30143.0
Compiler flags:
C               -nologo -IC:/home/program_files/src/root_v6.26.02/build/win -FIw32pragma.h -FIsehmap.h -MD -EHsc- -W3 -D_WIN32  -DNOMINMAX
C++             -nologo -IC:/home/program_files/src/root_v6.26.02/build/win -FIw32pragma.h -FIsehmap.h -Zc:__cplusplus -std:c++17 -MD -GR -EHsc- -W3 -wd4141 -wd4291 -wd4244 -wd4049 -wd4146 -D_WIN32  -D_XKEYCHECK_H -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING -D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING 
Linker flags:
Executable      /machine:X86
Module          /machine:X86 -ignore:4049,4206,4217,4221 -incremental:no
Shared          /machine:X86 -ignore:4049,4206,4217,4221 -incremental:no

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_lz4 builtin_lzma builtin_nlohmannjson builtin_openui5 builtin_pcre builtin_tbb builtin_xxhash builtin_zlib builtin_zstd clad dataframe exceptions fftw3 gdml gnuinstall http imt mathmore mlp minuit2 opengl pyroot roofit webgui root7 shared tmva tmva-cpu tmva-pymva spectrum
-- Configuring done
-- Generating done
-- Build files have been written to: C:/home/program_files/root/build_v6.26.02

Best wishes,
Nazar

Hi, the ROOT binaries have been built with the latest VS 2019 for the 32 bit version and the latest VS 2022 for the 64 bit version. And they are compatible.

Sorry, but I don’t see any error in this output, it looks just fine. What is the exact error you get?

Errors on “cmake --build . --target install”:

 Generating G__MathCore.cxx, ../../bin/libMathCore_rdict.pcm, ../../bin/libMathCore.rootmap
  Exit code 0xc0000142

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241
,5): error MSB8066: Custom build for 'C:\home\program_files\root\build_v6.26.02\CMakeFiles\ccee41822186a44efea2a025560d
ab2d\G__MathCore.cxx.rule' exited with code 1. [C:\home\program_files\root\build_v6.26.02\math\mathcore\G__MathCore.vcx
proj]
  Generating G__Eve2.cxx, ../../bin/libEve_G__Eve2_rdict.pcm, ../../bin/libEve32.rootmap
  Exit code 0xc0000142

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241
,5): error MSB8066: Custom build for 'C:\home\program_files\root\build_v6.26.02\CMakeFiles\d5c7c6f54b68710c2fc7edc36e1f
724f\G__Eve2.cxx.rule' exited with code 1. [C:\home\program_files\root\build_v6.26.02\graf3d\eve\G__Eve2.vcxproj]
  Generating G__Net.cxx, ../../bin/libNet_rdict.pcm, ../../bin/libNet.rootmap
  Exit code 0xc0000142

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241
,5): error MSB8066: Custom build for 'C:\home\program_files\root\build_v6.26.02\CMakeFiles\f19fbd429cfefd0f5525af0533d0
a37b\G__Net.cxx.rule' exited with code 1. [C:\home\program_files\root\build_v6.26.02\net\net\G__Net.vcxproj]
  Generating G__XMLIO.cxx, ../../bin/libXMLIO_rdict.pcm, ../../bin/libXMLIO.rootmap
  Exit code 0xc0000142

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241
,5): error MSB8066: Custom build for 'C:\home\program_files\root\build_v6.26.02\CMakeFiles\2f024d9217363baa4bc5ccd4bd9c
9dd1\G__XMLIO.cxx.rule' exited with code 1. [C:\home\program_files\root\build_v6.26.02\io\xml\G__XMLIO.vcxproj]
  Generating G__ROOTVecOps.cxx, ../../bin/libROOTVecOps_rdict.pcm, ../../bin/libROOTVecOps.rootmap
  Exit code 0xc0000142

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241
,5): error MSB8066: Custom build for 'C:\home\program_files\root\build_v6.26.02\CMakeFiles\99f0e6c39e40b188a5b04907a3af
1fec\G__ROOTVecOps.cxx.rule' exited with code 1. [C:\home\program_files\root\build_v6.26.02\math\vecops\G__ROOTVecOps.v
cxproj]

OK, so I see quite several options for which I don’t know what effect they could have. For example C:\Program Files (x86)\GnuWin32\include so can you try without those options:

-DZLIB_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\zlib.lib"
-DZLIB_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include"

since you specify -Dbuiltin_zlib=ON anyway.
And remove also these options:

-DGIF_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\giflib.lib"
-DGIF_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include"
-DPNG_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\libpng.lib"
-DPNG_PNG_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include"
-DJPEG_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\jpeg.lib"
-DJPEG_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include"
-DTIFF_LIBRARY="C:\Program Files (x86)\GnuWin32\lib\libtiff.lib"
-DTIFF_INCLUDE_DIR="C:\Program Files (x86)\GnuWin32\include"
-DGSL_ROOT_DIR="C:\Program Files\vcpkg\installed\x86-windows"
-Dgnuinstall=ON

To see if it helps. (-Dgnuinstall on Windows?)

In fact, you should already try with:

cmake -G"Visual Studio 16 2019" -A Win32 -Thost=x64 -DCMAKE_INSTALL_PREFIX=C:\home\program_files\root\root_v6.26.02 C:\home\program_files\src\root_v6.26.02

and see if it works.

Thanks, i didn’t notice that I’d already had builtin_zlib=ON. I will try to build using your advise and report the results.

I’ve downloaded the pre-built binary 6.26.02 and installed it.
I tried to load simple helloworld program:

#include <corecrt.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
	printf("Hello world!\n");
	return (0);
}

Errors:

root [1] .L  src/tests/test_corecrt.c
In file included from input_line_8:1:
In file included from C:\home\devel\projects\test.world\src\tests\test_corecrt.c:3:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:205:12: error: redefinition of '_CrtEnableIf<true, _Ty>'
    struct _CrtEnableIf<true, _Ty>
           ^~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:205:12: note: previous definition is here
    struct _CrtEnableIf<true, _Ty>
           ^
In file included from input_line_8:1:
In file included from C:\home\devel\projects\test.world\src\tests\test_corecrt.c:3:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:596:16: error: redefinition of '__crt_locale_data_public'
typedef struct __crt_locale_data_public
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\crtdbg.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\home\devel\projects\test.world\src\tests\test_corecrt.c:3:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
In file included from input_line_8:1:
In file included from C:\home\devel\projects\test.world\src\tests\test_corecrt.c:3:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:603:16: error: redefinition of '__crt_locale_pointers'
typedef struct __crt_locale_pointers
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\crtdbg.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\home\devel\projects\test.world\src\tests\test_corecrt.c:3:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
In file included from input_line_8:1:
In file included from C:\home\devel\projects\test.world\src\tests\test_corecrt.c:3:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:611:16: error: redefinition of '_Mbstatet'
typedef struct _Mbstatet
               ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\crtdbg.h:12:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
C:\home\devel\projects\test.world\src\tests\test_corecrt.c:3:10: note: 'C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h' included multiple times, additional include
      site here
#include <corecrt.h>
         ^
root [2]

It seems like 6.26.02 and Windows 10 SDK 10.0.19041 are incompatible or I don’t understand something?

Yes, you’re right, apparently the latest update of the Windows 10 SDK introduced an incompatibility (again). So the only option is to build from source, or wait for me to update our infrastructure…

I tried

cmake -G"Visual Studio 16 2019" -A Win32 -Thost=x64 -DCMAKE_INSTALL_PREFIX=C:\home\program_files\root\root_v6.26.02 C:\home\program_files\src\root_v6.26.02"

and then

cmake --build .

Now i don’t have the problem with generating G_MathCore.cxx, but now I have this:

     Creating library C:/home/program_files/root/build_v6.26.02/lib/root.exe.lib and object C:/home/program_files/root/
  build_v6.26.02/lib/root.exe.exp
  root.exe.vcxproj -> C:\home\program_files\root\build_v6.26.02\bin\root.exe
  Generating tutorials/hsimple.root
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241
,5): error MSB8066: Custom build for 'C:\home\program_files\root\build_v6.26.02\CMakeFiles\660a59c8b3c68266ef6fc0ca927d
971b\hsimple.root.rule;C:\home\program_files\root\build_v6.26.02\CMakeFiles\c2d749d6f4cbc6903c300b712e6ae3de\hsimple.ru
le' exited with code -1073741515. [C:\home\program_files\root\build_v6.26.02\hsimple.vcxproj]

By the way, what SDK did you use for building 6.26.02?

Thanks,
Nazar

Visual Studio v16.11.11 and Windows SDK 10.0.19041.0

BTW, from where did you build ROOT (which command prompt)?

I have SDK 10.0.19041.0 too. Now i don’t understand why i have problems with pre-built binary(

x86 Native Tools Command Prompt for VS 2019


** Visual Studio 2019 Developer Command Prompt v16.11.13
** Copyright (c) 2021 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: ‘x86’

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.