ROOT Version (5.34.36):
Platform, compiler (Windows 10):
(I am using root 5.34.36 (on windows 10)
I am unable to compile this code outside of root.
This is my code ( I save it as a .cpp file and try to execute it outside root using g++ (filename).cpp) and i get the error :
#include <iostream>
#include <TObject.h>
#include <TROOT.h>
#include<TFile.h>
#include <TTree.h>
using namespace std;
int main ()
{
cout << “Hellow World” << endl;
return 0;
}
C:\Users\DEBAJY~1\AppData\Local\Temp\ccgInqnq.o:rootpr.cpp:(.text+0x92): undefined reference to `TVersionCheck::TVersionCheck(int)’
collect2.exe: error: ld returned 1 exit status
and I get the error :
g++: error: `root-config: No such file or directory
g++: error: unrecognized command line option ‘–cflags’
g++: error: unrecognized command line option ‘–libs’’
Sorry, I am typing from my phone.
I am not a Windows expert and I don’t know if the backticks ` work like on Unix.
Run the root-config command I alluded to earlier and copy paste the result in your compilation invocation.