Namespacing missing in include/omnetpp/simkerneldefs.h (OMNeT++ 5b2)

55 views
Skip to first unread message

Rens van der Heijden

unread,
Aug 28, 2015, 8:25:45 AM8/28/15
to OMNeT++ Users
I noticed that on line 56 in include/omnetpp/simkerneldefs.h, the namespacing for cRuntimeError is missing:
   ((void) ((expr) ? 0 : (throw cRuntimeError("ASSERT: condition %s false in function %s, %s line %d", \
This should read:
((void) ((expr) ? 0 : (throw omnetpp::cRuntimeError("ASSERT: condition %s false in function %s, %s line %d", \
Such that when other namespaced stuff uses this code,  things work properly.

In particular, this fixes the following compile error for veins (4a2) against the new OMNeT++ beta:
veins/modules/mobility/traci/TraCIBuffer.cc
In file included from /home/namnatulco/simulation/omnetpp/include/omnetpp/cexception.h:22:0,
                 from ./veins/modules/mobility/traci/TraCIBuffer.h:7,
                 from veins/modules/mobility/traci/TraCIBuffer.cc:1:
veins/modules/mobility/traci/TraCIBuffer.cc: In member function ‘T Veins::TraCIBuffer::read() [with T = Veins::TraCICoord]’:
/home/namnatulco/simulation/omnetpp/include/omnetpp/simkerneldefs.h:57:75: error: ‘cRuntimeError’ was not declared in this scope
                                    #expr, __FUNCTION__, __FILE__, __LINE__), 0)))
                                                                           ^
veins/modules/mobility/traci/TraCIBuffer.cc:69:2: note: in expansion of macro ‘ASSERT’
  ASSERT(posType == POSITION_2D);
  ^
/home/namnatulco/simulation/omnetpp/include/omnetpp/simkerneldefs.h:57:75: note: suggested alternative:
                                    #expr, __FUNCTION__, __FILE__, __LINE__), 0)))
                                                                           ^
veins/modules/mobility/traci/TraCIBuffer.cc:69:2: note: in expansion of macro ‘ASSERT’
  ASSERT(posType == POSITION_2D);
  ^
In file included from ./veins/modules/mobility/traci/TraCIBuffer.h:7:0,
                 from veins/modules/mobility/traci/TraCIBuffer.cc:1:
/home/namnatulco/simulation/omnetpp/include/omnetpp/cexception.h:267:15: note:   ‘omnetpp::cRuntimeError’
 class SIM_API cRuntimeError : public cException
               ^
Makefile:165: recipe for target '../out/gcc-debug//src/veins/modules/mobility/traci/TraCIBuffer.o' failed
make[1]: *** [../out/gcc-debug//src/veins/modules/mobility/traci/TraCIBuffer.o] Error 1

Michael Kirsche

unread,
Aug 28, 2015, 9:31:27 AM8/28/15
to OMNeT++ Users
Hi Rens,

you should probably open a new issue at the OMNeT bugtracker.
https://dev.omnetpp.org/bugs/view_all_bug_page.php

This will draw more attention to it (from the core developing team I mean).

Varga, András

unread,
Aug 28, 2015, 10:38:17 AM8/28/15
to omn...@googlegroups.com
Hi,

Thanks for reporting the bug, I confirm having seen it, will be fixed in the next beta :)

Cheers
Andras

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages