小编Tom*_*cký的帖子

rustc如何从bash进程替换编译源代码但是gcc不能?

$ rustc <(echo 'fn main(){ print!("Hello world!");}')
$ ls
63
$ gcc <(echo '#include<stdio.h> int main(){ printf("Hello world!\n"); return 0;}')
/dev/fd/63: file not recognized: Illegal seek
collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

为什么不能ld链接该程序?

c unix linux bash rust

2
推荐指数
1
解决办法
187
查看次数

标签 统计

bash ×1

c ×1

linux ×1

rust ×1

unix ×1