# Including Libraries to make macros in c++

**URL:** <https://root-forum.cern.ch/t/including-libraries-to-make-macros-in-c/53778>\
**Category:** Newbie\
**Tags:** hist, root\
**Created:** [February 25, 2023, 6:17pm UTC](https://root-forum.cern.ch/t/including-libraries-to-make-macros-in-c/53778 "2023-02-25T18:17:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishanpatel](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/i/76d3ee/32.png) [@ishanpatel](https://root-forum.cern.ch/u/ishanpatel)\
**Post date:** [February 25, 2023, 6:17pm UTC](https://root-forum.cern.ch/t/including-libraries-to-make-macros-in-c/53778/1 "2023-02-25T18:17:25Z")

</div>

How do I get #includ “TH1F.h” to run in my macro. It says that the file is not found. Do I have to download it separately? I already have root installed and I thought that the libraries are all installed when that happens.

---

<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:** [February 25, 2023, 7:41pm UTC](https://root-forum.cern.ch/t/including-libraries-to-make-macros-in-c/53778/2 "2023-02-25T19:41:50Z")

</div>

[ROOT Primer → ROOT Macros](https://root.cern/primer/#root-macros)

---

<div class="post-metadata">

**Author:** ![ishanpatel](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/i/76d3ee/32.png) [@ishanpatel](https://root-forum.cern.ch/u/ishanpatel)\
**Post date:** [February 25, 2023, 8:24pm UTC](https://root-forum.cern.ch/t/including-libraries-to-make-macros-in-c/53778/3 "2023-02-25T20:24:04Z")

</div>

So does that mean I dont need to #include anything in my macro? If I were to put it through root it would run automatically?
