I am experimenting with creation of my first package called OHTLCSM.jl. I followed the steps at the link below to add the package to my local repository:
Link: Simple Package Tutorial
StaticArrays.jl was among the dependencies I added from the repl via:
(@v1.5) pkg > activate .
(OHTLCSM) pkg > add StaticArrays Updating registry at `C:\Users\myusername\.julia\registries\General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
No Changes to `C:\Users\myusername\.julia\dev\OHTLCSM\Project.toml`
No Changes to `C:\Users\myusername\.julia\dev\OHTLCSM\Manifest.toml`
(@v1.5) pkg > activate
Activating environment at `C:\Users\myusername\.julia\environments\v1.5\Project.toml`
The package pre-compiles ok, but I get the following error when I run the one function in the package:
UndefVarError: SVector not defined
It seems like the dependency was not established properly. Is the procedure I used above valid? The code works fine outside the package environment.
Is it necessary to include the using StaticArrays
statement inside the module if dependencies have been added via the repl?
11 posts - 4 participants