diff --git a/Tools/ardupilotwaf/ardupilotwaf.py b/Tools/ardupilotwaf/ardupilotwaf.py index 7b7f18b990..332c722489 100644 --- a/Tools/ardupilotwaf/ardupilotwaf.py +++ b/Tools/ardupilotwaf/ardupilotwaf.py @@ -164,6 +164,9 @@ def ap_program(bld, program_dir=program_dir, **kw ) + if 'use' in kw and bld.env.STATIC_LINKING: + # ensure we link against vehicle library + tg.env.STLIB += [kw['use']] for group in program_groups: _grouped_programs.setdefault(group, []).append(tg)