You need to modify the wscript file and attach the necessary libraries or else you'll get the errors that the libraries aren't found.
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
import os
def build(bld):
# Location of the library path
lib_path = '<library path location>'
# Adding the static version of the library
bld.read_stlib('<library name i.e the -lxxx without the -l', paths=[lib_path + 'lib'])
# If you have a dynamic library use
bld.read_shlib(....)
def set_properties(obj):
# Adding the include folders directory for the library
obj.includes = ['#', lib_path + 'include']
# Adding the library together with the ns-3 dependencies
obj.use = obj.ns3_module_dependencies + ['<library name, again i.e -lxxx without the -l']
obj.install_path = None
all_modules = [mod[len("ns3-"):] for mod in bld.env['NS3_ENABLED_MODULES']]
obj = bld.create_ns3_program('TestSource', all_modules)
obj.source = ['TestSource.cc']
set_properties(obj)