Declaring libraries in root

This is the code i’m trying to run, the body of the code is copied from root site of histogram lessions for beginners. I’m getting the following error. I’m learning root.



Please read tips for efficient and successful posting and posting code

ROOT Version: 6.18/04
Platform: Windows
Compiler: Not Provided


@bellenot can you please take a look here?

Thank you!

Hi,

I don’t see the problem with the master. I will try with 6.18.04 and I’ll let you know.

Cheers, Bertrand.

Hi,

It works just fine for me with ROOT v6.18/04:

C:\Users\bellenot\rootdev>root
   ------------------------------------------------------------
  | Welcome to ROOT 6.18/04                  https://root.cern |
  |                               (c) 1995-2019, The ROOT Team |
  | Built for win32 on Sep 11 2019, 15:38:23                   |
  | From tags/v6-18-04@v6-18-04                                |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] .x macro5.cxx
Moments of Distribution:
 - Mean     = 3.5625 +- 0.0895976
 - Std Dev  = 1.79195 +- 0.0633551
 - Skewness = 0.326374
 - Kurtosis = -0.242483
root [1]

The problem you see might be due to a different version of Visual Studio/Windows 10 SDK than the one used to build ROOT

Cheers, Bertrand.

do you mean macro when you say master?

Sorry but I’m pretty new to programming and am just an undergrad student. If you could help me, how do I configure my softwares to be used with root?

Thanks

No, I mean the master branch of git (https://github.com/root-project/root)

Sure! Which softwares?

Visual Studio for once as you mentioned in your reply, how do I know for sure that what was suggested is the cause, and if it is, how can it be fixed?

This is a bit complicated, and we will try to get rid of this limitation in the future… One solution would be to install several Windows 10 SDK on your system (using the Visual Studio Installer), or to rebuild ROOT from source. BTW, is there any error (or warning) message when you start ROOT?

Yes, there are several redefinition errors; here is the complete log.

OK, so try to install the version 10.0.17763.0 of the Windows 10 SDK with the Visual Studio Installer

Or you can try to download one of the nightly builds, for example root_v6.19.01.win32.vc16.debug.zip or root_v6.19.01.win32.vc16.zip (or the executables)

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