rustc 在使用 println!
时不会向终端输出任何内容。
代码:
fn main() {
println!("Hello, world!");
}
运行它:
me@mclaptop:~
> rustc helloworld.rs
me@mclaptop:~
>
为什么它不打印任何东西?
最佳答案
rustc
是 Rust 语言的编译器,它只是生成一个可执行文件来运行。如果您想真正看到输出,您必须运行 ./helloworld
命令。
你可以阅读它here .
关于Rust 不打印到终端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58356395/