在根据这个文档学习时 https://kaisery.github.io/trpl-zh-cn/ch07-01-mod-and-the-filesystem.html https://kaisery.github.io/trpl-zh-cn/ch07-02-controlling-visibility-with-pub.html
在第二篇文章中加入
extern crate communicator;
后,在编译的时候提示如下:
warning: custom registry support via the registry.index
configuration is being removed, this functionality will not work in the future
Compiling test2 v0.1.0 (file:///home/liuwenling/project/test2)
error[E0463]: can't find crate for communicator
--> src/main.rs:1:1
|
1 | extern crate communicator;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to previous error
error: Could not compile test2
.
请问中间是不是漏掉了什么步骤??
评论区
写评论感谢,已经解决了~
markdown 格式,调整一下
??格式发出来就没有了??
在 Cargo.toml [dependencies]
communicator = { path = "这里" }
#当前目录是 Cargo.toml 所在的目录 #path填 communicator 项目目录