OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000408OMNeT++simulation kernelpublic2011-09-07 14:512011-09-08 11:23
Reporterphreatom 
Assigned Toandras 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionwon't fix 
PlatformOSOS Version
Product Version4.1 
Target VersionFixed in Version4.2 
Summary0000408: Declaration of Makro ev in cenvir.h interferes with boost::system
DescriptionIn cenvir.h a Makro called "ev" in lower case is defined in line 67:

#define ev (*cSimulation::getActiveEnvir())

As boost uses a variable named "ev" in system_error.hpp, this leads to unwanted replacements and build breaks if you use boost libraries. I suggest to refactor it to a more meaningful name.

As a workaround you may change your include order, and include any boost using header first, but this is surely not wanted behavior.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000541)
andras (administrator)
2011-09-08 11:23

"ev" cannot be renamed: that would cause extremely severe backward compatibility problems because all simulation models use it extensively.

Suggested workaround: undefine ev in your code before you include the boost headers. If you need to use ev in your code later, redefine with the original content (OMNeT++ version dependent).

#include <omnetpp.h>
#undef ev
...

- Issue History
Date Modified Username Field Change
2011-09-07 14:51 phreatom New Issue
2011-09-08 11:23 andras Note Added: 0000541
2011-09-08 11:23 andras Status new => resolved
2011-09-08 11:23 andras Fixed in Version => 4.2
2011-09-08 11:23 andras Resolution open => won't fix
2011-09-08 11:23 andras Assigned To => andras


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker