Compilation of root with PostgreSQL (Windows 8.1 64-bit)

I’m new at working with root and also at working on Windows. I got instructions to compile root with PostgreSQL using VS 2010. I downloaded:

Microsoft Visual c++ 2010 express
cmake 3.1.1
PostgreSQL 9.3
root_v5.34.23 source

Fisrt, I should run this in the command prompt:

cmake -G "Visual Studio 10" -DCMAKE_INSTALL_PREFIX=c:\root -DPOSTGRESQL_INCLUDE_DIR="C:\Program Files\PostgreSQL\9.3\include" -DPOSTGRESQL_LIBRARIES="C:\Program Files\PostgreSQL\9.3\lib\libpq.lib" ..\root

I got an error:

[quote]CMake Error: The source directory “C:/Install/root” does not appear to contain C

I found different CMakeLists.txt files in root folder but they’re all different and I have no idea how CmakeLists.txt for my case should look like. I tried to find answer on different forums, but I’m new at this and I didn’t find any of the solution useful.


You must specify where the source directory of ROOT is (e.g. where you extracted the root source tar file)
And apparently, it is not in C:/Install/
Are you sure you took the source tar file of ROOT?

Cheers, Bertrand.

Yes, I extracted root to C:\Install\ and I only have folders build and root in it. I took the source file - root_v5.34.25.win32.vc10.tar.gz . I got instructions from colleague that used same procedure and it worked, but on 32-bit Windows. This is the whole procedure:

[code]cmake -G “Visual Studio 10” -DCMAKE_INSTALL_PREFIX=c:\root -DPOSTGRESQL_INCLUDE_DIR=“C:\Program Files\PostgreSQL\9.3\include” -DPOSTGRESQL_LIBRARIES=“C:\Program Files\PostgreSQL\9.3\lib\libpq.lib” …\root

#MSBuild.exe ROOT.sln /t:Clean;Build;Install /p:Configuration=Release
cmake --build . --target install --config Release
cmake -DCMAKE_INSTALL_PREFIX=c:\root -P cmake_install.cmake

I added PostgreSQL to path too, now I have environment variables, path: [quote]C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\CMake\bin;C:\Install\root\bin;C:\Program Files\PostgreSQL\9.3\lib;C:\Program Files\PostgreSQL\9.3\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin[/quote]

Cheers, Manca

Hi Manca,

[quote=“mphy”]I took the source file - root_v5.34.25.win32.vc10.tar.gz[/quote]Well, root_v5.34.25.win32.vc10.tar.gz [color=#FF0000]IS NOT[/color] the source code! The source is root_v5.34.25.source.tar.gz

Cheers, Bertrand.

Oh, I see, thanks. I was told to be sure to have ROOT version that is compatible with VS 10 and then I obviously made a mistake. It gets through now, but I have some other errors. I’ll try to figure it out on my own first. Thanks for help.

Cheers, M