Hello all,
i want to ask about a problem that i faced in using ns3 and can't find any clue to solve it. so if any one can help I'd really appreciate it.
since there is no enough and sufficient information about linking ns3 with external libraries in:
http://www.nsnam.org/wiki/index.php/HOWTO_use_ns-3_with_other_libraries
and that in turn give you link to this to:
http://shieldroute.blogspot.se/2012/08/extending-ns3-with-your-module-and.htmlread those and more and more in this group and elsewhere but still can't help me to link openCV library to ns3
know that i compile openCV code in C++ as follows :
g++ source_name.cc -o output_name `pkg-config --cflags --libs opencv`so basically it's using linking in the compilation code and using
pkg-config in this whole thing. and as a result of searching for something that helps i found in:
http://waf.googlecode.com/svn/docs/apidocs/tools/c_config.htmlto modify
wscrip as follows -where i want to use it- (and to me I'm trying to use it with applications model):
def configure(conf):
conf.check_cfg(package='opencv', args='--cflags --libs', uselib_store='OPENCV',mandatory=True)and add:
def build(bld):
module = bld.create_ns3_module('applications', ['internet'.........])
module.use.append('OPENCV')
till this far and when i run this command
./waf -d debug --enable-examples --enable-tests configure
it gives a checking note as:
checking for 'opencv'
: yse
but still when i run this command: ./waf
i get the errors :
undefined reference to `cvGet2D'
undefined reference to `cvCreateImage'
and those errors are the same as when i compile a code of only openCV with this:
g++ source_name.cc -o output_name without this part `pkg-config --cflags --libs opencv`
and what most reviews about those kind of errors undefined reference to.. says about it that it's an error in linking the openCV library.