# Makedocs: Undefined binding

**URL:** <https://discourse.julialang.org/t/makedocs-undefined-binding/3812>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [May 19, 2017, 5:55pm UTC](https://discourse.julialang.org/t/makedocs-undefined-binding/3812 "2017-05-19T17:55:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![leiteiro](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@leiteiro](https://discourse.julialang.org/u/leiteiro)\
**Post date:** [May 19, 2017, 5:55pm UTC](https://discourse.julialang.org/t/makedocs-undefined-binding/3812/1 "2017-05-19T17:55:04Z")

</div>

When I run makedocs() I get the error message:

```
!! Undefined binding 'myfunction'. [src\funlist.md]

```

I’m not able to find the error. Is there a common cause for this error?

Thanks.

---

<div class="post-metadata">

**Author:** ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)\
**Post date:** [May 20, 2017, 1:36am UTC](https://discourse.julialang.org/t/makedocs-undefined-binding/3812/2 "2017-05-20T01:36:44Z")

</div>

I am guessing that `myfunction` is not exported, so it’s not available in the scope where `makedocs` gets called. There was a similar question posted on Documenter’s issue tracker just recently: [https://github.com/JuliaDocs/Documenter.jl/issues/489](https://github.com/JuliaDocs/Documenter.jl/issues/489)

---

<div class="post-metadata">

**Author:** ![leiteiro](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@leiteiro](https://discourse.julialang.org/u/leiteiro)\
**Post date:** [May 20, 2017, 7:26am UTC](https://discourse.julialang.org/t/makedocs-undefined-binding/3812/3 "2017-05-20T07:26:08Z")

</div>

> “I am guessing that myfunction is not exported”

I checked this. No, ‘myfunction’ is exported.

Moreover, _all_ exported functions get this error.  
I think this might be a path problem and makedocs  
does not find the functions.

So what does “undefined binding” means exactly?  
And how do I define a ‘binding’?

---

<div class="post-metadata">

**Author:** ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)\
**Post date:** [May 20, 2017, 7:37am UTC](https://discourse.julialang.org/t/makedocs-undefined-binding/3812/4 "2017-05-20T07:37:42Z")

</div>

Binding in this case means the particular name within a module that the function is associated with (but it might not be the most accurate terminology). The module and functions that `makedocs` has to find have to be imported into the module that calls `makedocs`. Is `myfunction` imported into the module that calls `makedocs` with e.g. a `using` statement?

---

<div class="post-metadata">

**Author:** ![leiteiro](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@leiteiro](https://discourse.julialang.org/u/leiteiro)\
**Post date:** [May 20, 2017, 8:35am UTC](https://discourse.julialang.org/t/makedocs-undefined-binding/3812/5 "2017-05-20T08:35:54Z")

</div>

> “Is myfunction imported into the module that calls makedocs with e.g. a using statement?”

Thanks! This solved the problem. I was perhaps misguided by the docs of Documenter  
which reads:

```
using Documenter
makedocs(
    # keywords...
)

```

Shouldn’t it be then

```
using Documenter, MyModule
makedocs(
    # keywords...
)

```

---

<div class="post-metadata">

**Author:** ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)\
**Post date:** [May 20, 2017, 8:52am UTC](https://discourse.julialang.org/t/makedocs-undefined-binding/3812/6 "2017-05-20T08:52:13Z")

</div>

That particular example block should perhaps be removed, because it doesn’t really add to the surrounding text. And the text could probably be clarified to say that the functions & modules that will be used in the docs should be imported. There’s a better, more thorough example in the manual: [Guide · Documenter.jl](https://juliadocs.github.io/Documenter.jl/latest/man/guide/#Building-an-empty-document-1)
