# Using ROOT in a c++ code

**URL:** <https://root-forum.cern.ch/t/using-root-in-a-c-code/48257>\
**Category:** Newbie\
**Tags:** roofit, hist, root\
**Created:** [January 4, 2022, 11:02am UTC](https://root-forum.cern.ch/t/using-root-in-a-c-code/48257 "2022-01-04T11:02:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [January 4, 2022, 12:27pm UTC](https://root-forum.cern.ch/t/using-root-in-a-c-code/48257/2 "2022-01-04T12:27:39Z")

</div>

`$(root-config --cxx --cflags) file1.cpp file2.cpp file3.cpp main.cpp $(root-config --libs)`

---

_[View the full topic](https://root-forum.cern.ch/t/using-root-in-a-c-code/48257)._
