Closed sumiteshpurohit closed 3 years ago
Hi. Could you provide that file, or at least a reduced example which is failing?
Hi. Thanks for looking into this.
Below is the code i am running:
from pygccxml import utils
from pygccxml import declarations
from pygccxml import parser
# Find the location of the xml generator (castxml or gccxml)
generator_path, generator_name = utils.find_xml_generator()
# Configure the xml generator
xml_generator_config = parser.xml_generator_configuration_t(
xml_generator_path=generator_path,
xml_generator=generator_name,
cflags="-std=c++11", include_paths = ["build"])
# The c++ file we want to parse
filename = "src/mobility/model/random-waypoint-mobility-model.h"
# Parse the c++ file -- this is where the code is failing
decls = parser.parse([filename], xml_generator_config)
# Get access to the global namespace
global_namespace = declarations.get_global_namespace(decls)
# Get access to the 'ns' namespace
ns = global_namespace.namespace("ns")
Ans below is the snapshot of error which I am getting.
The code is failing at this statement: decls = parser.parse([filename], xml_generator_config)
Please let me know if you need any other info.
Try adding the header containing EventId first, e.g: ns3.zip
Try adding the header containing EventId first, e.g: ns3.zip
This works, thank you very much.
Looks like this has been solved as the header needed to be included first.
When parsing several files from ns3 (e.g. src/mobility/model/random-waypoint-mobility-model.h), we are getting this error
error: unknown type name 'EventId' EventId m_event; //!< event ID of next scheduled event
Can you please help here?