Using 'LIBS' in scons 'Program' command failed to find static library, why?
问题 I've got a 'n.c' as main function, and 'o.c' as import function, like below: $ cat n.c o.c int f(); int main(){ f(); return 0; } #include<stdio.h> int f(){ printf("hello\n"); return 2; } Then scons file like below: Library('o.c') Program('n.c',LIBS=['o']) What I hope here is to compile o.c and generate libo.a(OK), and n.c will use this '.a' to generate final executable. So I specified LIBS=['o'], in hoep that it will specify an archive file to find libo.a library. But: $ scons -Q gcc -o n n.o