Linking With a Library
env = Environment(CC = 'gcc',
LIBS = 'world')
env.Program('hello.c')
% scons
gcc -c hello.c -o hello.o
gcc -c world.c -o world.o
gcc -o hello hello.o -lworld
Creating a Library
env = Environment(CC = 'gcc',
LIBS = 'world')
env.Program('hello.c')
env.Library('world.c')
% scons
gcc -c hello.c -o hello.o
gcc -c world.c -o world.o
ar r libworld.a world.o
ar: creating libworld.a
ranlib libworld.a
gcc -o hello hello.o libworld.a