# Loading a library from a script

**URL:** <https://root-forum.cern.ch/t/loading-a-library-from-a-script/24306>\
**Category:** ROOT\
**Created:** [April 3, 2017, 10:21pm UTC](https://root-forum.cern.ch/t/loading-a-library-from-a-script/24306 "2017-04-03T22:21:03Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [April 4, 2017, 6:13pm UTC](https://root-forum.cern.ch/t/loading-a-library-from-a-script/24306/6 "2017-04-04T18:13:18Z")

</div>

Also, what do I need to do so that I can recall the same macro multiple times? Currently it crashes with warning of ‘unknown types’ when calling it more than once:

```auto
[0] .x macro.C
Success!
[1] .x macro.C
... error: unknown type name 'foo' ...

```

EDIT: I tried wrapping the library loading in a header guard, but that didn’t resolve the issue.

---

_[View the full topic](https://root-forum.cern.ch/t/loading-a-library-from-a-script/24306)._
