Compile root-6.24.00 from source in Windows 10

_ROOT Version: 6.24.00
_Platform: x64
_Compiler: Visual Studio 19


I try to build root from source in Windows 10 with the next command:
“cmake -DCMAKE_INSTALL_PREFIX=C:\home\program_files\root_v6.24.00 -DCMAKE_INSTALL_LIBDIR=\lib\root -DCMAKE_INSTALL_INCLUDEDIR=\include\root -DCMAKE_INSTALL_SYSCONFDIR=\etc\root -DCMAKE_INSTALL_DATAROOTDIR=\share -DFFTW_INCLUDE_DIR=C:\home\devel\lib\fftw-3.3.5-dll64 -DFFTW_LIBRARY=C:\home\devel\lib\fftw-3.3.5-dll64\libfftw3-3.lib -Dbuiltin_freetype=ON -Dbuiltin_gsl=ON -Dcxxmodules=ON -Dgnuinstall=ON -Dminuit2=ON …\source”.

But I have
“-- Looking for pthread.h - not found
– Found Threads: TRUE”

How I can specify path to pthread.h?

Best wishes,

ROOT doesn’t need pthread on Windows

As I understand, I can use pthread-win32 on Windows. So, do you mean that I can use this library without any special settings on a stage of ROOT building?

I mean that ROOT itself does not use (does not support) pthread on Windows.

Oh, now I understand, thank you.

1 Like

Now I have the next question.
I had added “-DPython3_ROOT_DIR=C:/Users/nazar/AppData/Local/Programs/Python/Python39” option and have this error:
‘CMake Error at bindings/pyroot/cppy/CPyCppyy/CMakeLists.txt:59 (target_link_libraries):
The “optimized” argument must be followed by a library.’

And what I should do with this?


I don’t know. Usually, having the location of pyhton.exe (e.g. for me C:\Python38-32\Scripts\;C:\Python38-32\) in your PATH is enough to enable PyROOT. And it will only work with the 32 bit version of Python

Ok, thanks. If I find a solution, I’ll write here, maybe It’ll be useful for someone else.

Ok, i find a solution. People, don’t forget that you must use python for win32 architecture, and if you have both 32 and 64 python version, don’t forget to set PYTHON_EXECUTABLE to x32 python version.

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