# Using struct defined in a different module results in an error

**URL:** <https://discourse.julialang.org/t/using-struct-defined-in-a-different-module-results-in-an-error/78603>\
**Category:** New to Julia\
**Tags:** struct, modules\
**Created:** [March 28, 2022, 10:07am UTC](https://discourse.julialang.org/t/using-struct-defined-in-a-different-module-results-in-an-error/78603 "2022-03-28T10:07:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [March 28, 2022, 2:38pm UTC](https://discourse.julialang.org/t/using-struct-defined-in-a-different-module-results-in-an-error/78603/3 "2022-03-28T14:38:27Z")

</div>

Welcome to our community! 🎊

I recommend you reading this previous but recent thread.

> [@Referencing the same module from multiple files](https://discourse.julialang.org/t/referencing-the-same-module-from-multiple-files/77775/2):
>
> Welcome to our community! confetti_ball This problem is frequent among novice Julia programmers and was already asked multiple times in this forum. (But I concede that the search utility of Discourse never finds any useful results, even when I know they exist.) See: Basically, the rule is: include once and import whenever necessary. Your topmost module should include all files a single time and you should use import/using relative to it (using .MyModule refers to a module defined in th…

---

_[View the full topic](https://discourse.julialang.org/t/using-struct-defined-in-a-different-module-results-in-an-error/78603)._
