# Unbound module error from accessing locally defined modules

**URL:** <https://discuss.ocaml.org/t/unbound-module-error-from-accessing-locally-defined-modules/16182>\
**Category:** Learning\
**Created:** [February 25, 2025, 9:01am UTC](https://discuss.ocaml.org/t/unbound-module-error-from-accessing-locally-defined-modules/16182 "2025-02-25T09:01:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thonkpad](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/thonkpad/32/5816_2.png) [@thonkpad](https://discuss.ocaml.org/u/thonkpad)\
**Post date:** [February 25, 2025, 9:01am UTC](https://discuss.ocaml.org/t/unbound-module-error-from-accessing-locally-defined-modules/16182/1 "2025-02-25T09:01:36Z")

</div>

Hi, I’m a bit new to OCaml, trying to write a BrainF interpreter with it currently. I’m getting an “unbound error module” error when opening an .ml file into another. For example when I run this in `dune utop`

```auto
utop # #use "evalbf.ml";;
File "evalbf.ml", line 2, characters 5-12:
2 | open Parsebf
         ^^^^^^^
Error: Unbound module Parsebf
Hint: Did you mean Parsing?

```

I also got the same error when compiling with `ocamlopt` . However `dune build` runs just fine and doesn’t produce the error. Also, I tried to run `dune clean && dune build` but the error still persists. Is there a step I’m missing or maybe some bug?

Thanks in advance!

(also i’m not sure if this has anything to do with it but i’m doing the ocaml project inside a nix shell environment, apologies if this isn’t the right place for it)

---

<div class="post-metadata">

**Author:** ![Leonidas](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/leonidas/32/4039_2.png) [@Leonidas](https://discuss.ocaml.org/u/Leonidas)\
**Post date:** [February 25, 2025, 10:18am UTC](https://discuss.ocaml.org/t/unbound-module-error-from-accessing-locally-defined-modules/16182/2 "2025-02-25T10:18:31Z")

</div>

It depends on your project structure. If your `Parsebf` module is in a wrapped library, you probably need to access it as `Libraryname.Parsebf`.
