I have a couple Julia files within a directory, namely
FolderName
|
|---main.jl
|---VectorFunctions.jl
|---MatrixFunctions.jl
The following is the structure for the files:
VectorFunctions.jl
module VectorFunctions
# functions...
end
MatrixFunctions.jl
include("VectorFunctions.jl")
module MatrixFunctions
# functions...
end
main.jl
include("VectorFunctions.jl")
include("MatrixFunctions.jl")
# Using the functions defined in both files...
Running the code with julia main.jl
in my terminal, I get the following:
WARNING: replacing module VectorFunctions.
=== Desired Output ===
If I remove the include to VectorFunctions.jl in main.jl, the error disappears (I suspect because VectorFunctions is not being included again). Is there a way to get around this WARNING and still keep my my additional include in main.jl?