# Problem with using in Submodules

**URL:** <https://discourse.julialang.org/t/problem-with-using-in-submodules/42321>\
**Category:** New to Julia\
**Created:** [June 30, 2020, 7:31pm UTC](https://discourse.julialang.org/t/problem-with-using-in-submodules/42321 "2020-06-30T19:31:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [June 30, 2020, 7:47pm UTC](https://discourse.julialang.org/t/problem-with-using-in-submodules/42321/2 "2020-06-30T19:47:07Z")

</div>

> [@Isaia\_Nisoli](#):
>
> It seems like it is processing the file from top to bottom,

Yes, that’s right.

> [@Isaia\_Nisoli](#):
>
> (I cannot, they “use” each other)

That’s the actual problem–you can’t do this. Here’s a simpler non-working example:

```julia
julia> module A
         module B
           using ..C
         end
         module C
           using ..B
         end
       end
ERROR: UndefVarError: C not defined

```

There must be a non-cyclic ordering of your various modules; they cannot depend on each other. If they both need to share some common information (such as a type definition), then you can move the shared information into a new module and have both modules depend on that shared module.

---

_[View the full topic](https://discourse.julialang.org/t/problem-with-using-in-submodules/42321)._
