# Pythia version compatible with the latest version of ROOT (and including histograms in Pythia!)

**URL:** <https://root-forum.cern.ch/t/pythia-version-compatible-with-the-latest-version-of-root-and-including-histograms-in-pythia/34247>\
**Category:** Newbie\
**Created:** [May 25, 2019, 4:00am UTC](https://root-forum.cern.ch/t/pythia-version-compatible-with-the-latest-version-of-root-and-including-histograms-in-pythia/34247 "2019-05-25T04:00:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jialvarez](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@jialvarez](https://root-forum.cern.ch/u/jialvarez)\
**Post date:** [May 25, 2019, 4:00am UTC](https://root-forum.cern.ch/t/pythia-version-compatible-with-the-latest-version-of-root-and-including-histograms-in-pythia/34247/1 "2019-05-25T04:00:36Z")

</div>

Good day!

I installed version pythia8240 and ROOT version 6.16.00 afterwards. I want to use the histogram found in ROOT in one of the examples (main91.cc). I can’t seem to find a way to “linked” those two versions to make main91.cc works. I somehow solved this problem by installing an older version of pythia (8230) and doing the instructions found here: [http://home.thep.lu.se/~torbjorn/pythia82html/ROOTusage.html](http://home.thep.lu.se/~torbjorn/pythia82html/ROOTusage.html)

So I typed this command before typing the “make” command

```
./configure --with-root=root-installation-directory

```

After typing this command in the examples of pythia8230:

```
make main91
./main91

```

It now produced a histogram. Now, I tried using the command to include histogram in ROOT to another pythia file (this same command can also be found in the main91.cc file):

```
#include "TH1.h"

```

It now gives this error message:

```
mymain01.cc:1:10: fatal error: TH1.h: No such file or directory

```

I don’t know how to resolve this problem. That same command is in the main91.cc file but when I used this on a new file, it gives an error!

Also, what version of ROOT is compatible with pythia8230? or is there a way that I can “linked” pythia8240 with the latest version of ROOT (v6.16.00) so I won’t have a problem with making histogram in ROOT after doing simulations in Pythia? Thank you.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [May 27, 2019, 7:12am UTC](https://root-forum.cern.ch/t/pythia-version-compatible-with-the-latest-version-of-root-and-including-histograms-in-pythia/34247/2 "2019-05-27T07:12:03Z")

</div>

I think you should call `source /wherever_root_is_installed/root/bin/thisroot.sh` before compiling your code
