我在 Julia 中工作,我尝试使用 Documenter.jl 为 Examples.jl 创建文档页面,当我尝试运行 make.jl 文件时,我不断收到此错误:
错误:LoadError:UndefVarError:类型未定义
这是我的 make.jl 文件代码:
using Documenter
using Examples
makedocs(
sitename = "Examples.jl",
pages = Any[
"About" => "index.md",
"Main" => "main.md",
"Graphs" => "graphs.md",
"Utilities" => "utilities.md",
"Tutorial" => "tutorial.md"
]
)
有什么想法可以解决这个错误吗?谢谢
最佳答案
正如 @Matt B. 指出的那样,type
不再是有效的关键字。在 Julia 0.x 中,您曾经将类型定义为:
type foo
bar
end
Now we use而是使用 struct
或 mutable struct
。例如
struct foo
bar
end
检查您的代码,看看是否在任何地方看到type
。
关于julia - 错误: LoadError: UndefVarError: type not defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63305520/