master
master

Reputation: 1

How do link my ns3 program with system libraries?

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.

Upvotes: 0

Views: 1364

Answers (1)

Konstantinos
Konstantinos

Reputation: 556

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.

Upvotes: 0

Related Questions