#! /usr/bin/env python """ * the static lib order should be preserved * the static libraries must be given in reverse order """ bld.stlib( source = 'a.c', target = 'ST_A' ) bld.stlib( source = 'b.c', target = 'ST_B' ) bld.program( source = 'main.c', target = 'static_app', use = 'ST_B ST_A' # this is the correct order for ld )