0
votes

I need to link my ns3 program with lex and yaac libraries. Using gcc the command would simply be:

gcc -o my_program my_program -ll -ly

How do i do this using waf.

My current wscript looks like this:

def build(bld):
obj = bld.create_ns3_program('my_program', ['core', 'mobility', 'wifi', 'csma', 'applications', 'config-store', 'stats'])
obj.source = ['my_program.cc']

I have tried adding obj.env.append_values("LIB", ['l','y']) and several other variations. But that did not help.

1

1 Answers

0
votes

You need to update the wscript file and add the required library dependency. See the example here http://garfield001.wordpress.com/2013/04/16/compile-and-link-ns3-program-with-external-library/

Or you can look at examples like in /stats/ module how SQL libraries are included.