0

I am trying to build a ns3 module and I got stuck on " undefined reference errors" .I have dealt with those in the past by specifying the location of the definitions through #include directives but now I am puzzled by the fact that the undefined references are coming from the shared libraries as shown on the output I am getting on this link:

http://www.blikoon.com/wp-content/uploads/2014/05/wafError-1024x575.png

Some search results pointed out that my problem might be related to the path to my library not being specified but I do have the

module.uselib='Xerces-C++

statement in the wscript file of my module

Is there a way I can get waf to make my compiler aware of the Xerces library location.Searching on my system ,I have found that xerces is installed in :

/usr/include/xercesc

I am building on the latest verion of ns3.19 and it uses waf1.7.13.

Thank you for your time.

musimbate
  • 347
  • 6
  • 25

1 Answers1

1

I do not know about Xcerces, but this is how I have used libxml library. It should be fairly similar of other libraries. This is from NS-3.19, you can look at other modules that use external libraries such as the stats using SQL

In the wscript file of your module you should start like this:

import wutils

def configure(conf):
     have_libxml2 = conf.check_cfg(package='libxml-2.0', atleast_version='2.6',
                              args=['--cflags', '--libs'], uselib_store='LIBXML2',
                              mandatory=False)

conf.env['ENABLE_LIBXML2'] = have_libxml2
conf.report_optional_feature("XmlIo", "XmlIo",
                             conf.env['ENABLE_LIBXML2'],
                             "library 'libxml-2.0 >= 2.7' not found")
Konstantinos
  • 556
  • 4
  • 9