How to build a .exe using ROOT C++?


Please read tips for efficient and successful posting and posting coPreformatted textde

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

ROOT Version: 6.28
Platform: windows 10
Compiler: visual studio


How to build a .exe using ROOT C++ ?

Hello,

Thanks for posting. I am doing a bit of guesswork here since the context is thin.
If you mean the flags to pass to the compiler to build an executable linked to the ROOT libraries and including ROOT headers, the answer would be (assuming the compiler is g++, for clang++ they are the same):

g++ -o myexe.exe myCode.cpp `root-config --cflags --libs --glibs`

I hope this helps.

Cheers,
D

This manual entry might help you:

2 Likes

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