编译后运行程序的scons

2024-04-29 00:48:30 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在编译后直接运行构建的程序,这样我就可以用scons构建和启动程序。

我以为这个SConstruct文件,会在程序重建时启动它。

main = Program( "main", [ "main.cc" ] )

test = Command( None, None, "./main >testoutput" )
Depends( test, main )

每次我运行scons时,就会启动它

main = Program( "main", [ "main.cc" ] )

test = Command( None, None, "./main >testoutput" )
Requires( test, main )

但两者都不起作用,我的程序从来没有执行过。我做错什么了?


Tags: 文件test程序nonemainprogramsconscommand