【发布时间】:2019-01-24 02:59:49
【问题描述】:
例如,我有一个 .c 文件如下:
$cat hello.c
int main(){
return 0;
}
然后我使用 scons 构建并复制到某个地方:
$cat SConstruct
import os,sys
env = Environment()
hello = env.Program('hello.c')
env.InstallAs('/home/admin/hello-new', hello)
在名为 'admin' 的用户下运行 scons,它会打印:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o hello.o -c hello.c
gcc -o hello hello.o
scons: done building targets.
然后我尝试“ls /home/admin”,没有像“hello-new”这样的东西。所以我想知道为什么我的“env.InstallAs()”能正常工作?如何进行故障排除和修复?
谢谢。
【问题讨论】:
-
这个问题的答案在 scons.org 网站上的常见问题解答中。请考虑加入用户邮件列表和/或向 IRC 频道提出问题。
标签: build installation scons