Compile ROOT v6.16 with Visual studio 2019 successfully! (Good news for me!)

Good news! Compile ROOT v6.16 with Visual studio 2019 successfully!
For about 10 years with ROOT v5.3x, I decided to move to ROOT v6.xx.
With 2 days work and about 5 times attempt, I got success.


The following are some experience.


_ROOT Version:6.16/00
_Platform:Windows 7 x64 SP1
_Cmake: Cmake 3.14.3
_Compiler:Microsoft Visual Studio Enterprise 2019 Ver. 16.0.2
VisualStudio.16.Release/16.0.2+28803.202
Visual C++ 2019 00433-90000-00004-AA889
Microsoft Visual C++ 2019

GitHub.VisualStudio 2.8.0.6762
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Python 16.0.19074.1
Python - Conda 支持 16.0.19074.1
Python - Django 支持 16.0.19074.1
Python - IronPython 支持 16.0.19074.1
Python - 分析支持 16.0.19074.1

SQL Server Data Tools 16.0.61903.25110
Microsoft SQL Server Data Tools

Visual Studio Tools for CMake 1.0


For the Cmake-gui:
win32
Remove the useless entries, using the “Remove Entry” .


Python is included, however FFTW3 is not.

Configure and Generate.
Double click on ROOT.sln in your build folder.

Before generate your solution with VS 2019, you need to modify two of the source files(PlatformWin.cpp and
gunichartables.h).
…in your-source-dir\root-6.16.00\interpreter\cling\lib\Utils\PlatformWin.cpp:
in line 382, change the ‘<’ to ‘<=’ : Because _MSC_VER = 1920 for VS2019.


…in your-source-dir\root_v6.16.00.source\build\graf2d\win32gdk\gdk\src\glib\gunichartables.h
you need to save this file to “Unicode utf-8 with signature” with the “Advanced Save Options” of Visual Studio.

OK!
Generate your Solution with VS2019!

P.S.:
Thanks very much for the excellent work of CERN ROOT Group!

Best wishes!
Han

2 Likes

In the same way, rebuild within FFTW3 included.

Download the source code of fftw-3.3.8 from FFTW.
And compile it with the help of CMake.

Rebuild the ROOT6.16 with the help of CMake. The option FFTW_DIR.


Following is the result of execute the **\tutorials\fft\FFT.C

1 Like

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