# Redefinition error

**URL:** <https://root-forum.cern.ch/t/redefinition-error/54881>\
**Category:** Newbie\
**Created:** [May 16, 2023, 4:26pm UTC](https://root-forum.cern.ch/t/redefinition-error/54881 "2023-05-16T16:26:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![samfred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/samfred/32/39516_2.png) [@samfred](https://root-forum.cern.ch/u/samfred)\
**Post date:** [May 16, 2023, 4:26pm UTC](https://root-forum.cern.ch/t/redefinition-error/54881/1 "2023-05-16T16:26:25Z")

</div>

I am trying to run the slits.C file from the tutorial found on the main site but I keep getting “error: redefinition of ”. I saw someone else solved their problem by updating their ROOT version, but I have v6.28 and still get this error. Any ideas?

_ROOT Version:_ 6.28.04  
_Platform:_ ubuntu  
_Compiler:_ gcc11.3

* * *

---

<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:** [May 16, 2023, 5:22pm UTC](https://root-forum.cern.ch/t/redefinition-error/54881/2 "2023-05-16T17:22:22Z")

</div>

I get no problem with: [docbook/primer/macros/slits.C](https://raw.githubusercontent.com/cxx-hep/root-cern/master/docbook/primer/macros/slits.C)

---

<div class="post-metadata">

**Author:** ![samfred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/samfred/32/39516_2.png) [@samfred](https://root-forum.cern.ch/u/samfred)\
**Post date:** [May 16, 2023, 5:33pm UTC](https://root-forum.cern.ch/t/redefinition-error/54881/3 "2023-05-16T17:33:29Z")

</div>

That file worked for me, thanks! It’s slightly different from the one on the primer, though

---

<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:** [May 16, 2023, 6:30pm UTC](https://root-forum.cern.ch/t/redefinition-error/54881/4 "2023-05-16T18:30:43Z")

</div>

> [@samfred](#):
>
> error: redefinition of

WHAT?

---

<div class="post-metadata">

**Author:** ![samfred](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/samfred/32/39516_2.png) [@samfred](https://root-forum.cern.ch/u/samfred)\
**Post date:** [May 17, 2023, 7:31pm UTC](https://root-forum.cern.ch/t/redefinition-error/54881/5 "2023-05-17T19:31:41Z")

</div>

The error showed for every variable defined in the macro, so I meant to write “error:redefinition of ‘variable’”
