Dear Rooters,
I am currently studying physics at UniTO and i was asked to use root libraries in order to perform some data analysis.
I have alredy read Every single post about this topic on this forum yet coudd not manage to get root working on Vs.
I have alredy installed root and added the \include (c+±general) and \lib (linker-general) in the project properties.
My code is the following
#include <TROOT.h>
#include <TCanvas.h>
using namespace std;
int main()
{
TCanvas* canv = new TCanvas("c1", "", 200, 10, 1280, 720);
system("pause");
return 0;
}
And this are the errors i get.
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\ROOT\RWrap_libcpp_string_view.h(423,22): error C2589: ‘(’: illegal token on right side of ‘::’
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\ROOT\libcpp_string_view.h(193,9): warning C4068: unknown pragma
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(537,1): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(537,1): message : This diagnostic occurred in the compiler generated function ‘std::enable_if<ROOT::TypeTraits::IsSignedNumeral::value,TString>::type operator +(T,const TString &)’
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(547,1): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(547,1): message : This diagnostic occurred in the compiler generated function ‘std::enable_if<ROOT::TypeTraits::IsUnsignedNumeral::value,TString>::type operator +(T,const TString &)’
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(557,1): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(557,1): message : This diagnostic occurred in the compiler generated function ‘std::enable_if<IsFloatNumeral::value,TString>::type operator +(T,const TString &)’
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(560,54): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(572,40): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(611,60): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(620,52): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(635,44): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(645,49): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(657,47): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(678,49): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(691,68): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(694,68): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TString.h(697,69): warning C4267: ‘argument’: conversion from ‘size_t’ to ‘Ssiz_t’, possible loss of data
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TInterpreter.h(345,1): warning C4311: ‘type cast’: pointer truncation from ‘void *’ to ‘Long_t’
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TInterpreter.h(345,1): warning C4302: ‘type cast’: truncation from ‘void *’ to ‘Long_t’
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TVirtualQConnection.h(36,33): warning C4311: ‘type cast’: pointer truncation from ‘const void *’ to ‘Long_t’
1>D:\Programmazione\Nuova cartella\root_v6.18.04\include\TVirtualQConnection.h(36,33): warning C4302: ‘type cast’: truncation from ‘const void *’ to ‘Long_t’
1>Done building project “AnalisiDati.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any suggestion?
Thanks a lot.
ROOT Version: root_v6.18.04
Platform: Visual Studio 2019