OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000946OMNeT++simulation kernelpublic2016-02-19 13:312017-02-01 16:42
till 
rhornig 
highmajoralways
resolvedfixed 
5.0b3 
5.1pre3 
0000946: Namespace missing in __REGISTER_CONFIGOPTION(ID, ARGLIST) in regmacros.h
#define __REGISTER_CONFIGOPTION(ID, ARGLIST) \
  cConfigOption *ID; \
  EXECUTE_ON_STARTUP(omnetpp::configOptions.getInstance()->add(ID = new omnetpp::cConfigOption ARGLIST);)

should be
#define __REGISTER_CONFIGOPTION(ID, ARGLIST) \
  omnetpp::cConfigOption *ID; \
  EXECUTE_ON_STARTUP(omnetpp::configOptions.getInstance()->add(ID = new omnetpp::cConfigOption ARGLIST);)
Patch attached! There are probably more places where the new omnetpp namespace is missing!

Can I vote again for an omnetpp git repository? It must not be up to date (would be sufficient to push only the betas there!) Would be much easier to branch and patch there and propose a pull request
No tags attached.
patch regmacros.h.patch (364) 2016-02-19 13:31
https://dev.omnetpp.org/bugs/file_download.php?file_id=192&type=bug
Issue History
2016-02-19 13:31tillNew Issue
2016-02-19 13:31tillFile Added: regmacros.h.patch
2016-02-22 12:56rhornigNote Added: 0001164
2016-02-22 12:56rhornigStatusnew => resolved
2016-02-22 12:56rhornigFixed in Version => 5.0
2016-02-22 12:56rhornigResolutionopen => fixed
2016-02-22 12:56rhornigAssigned To => rhornig
2016-02-24 15:41tillNote Added: 0001165
2016-02-24 15:41tillStatusresolved => feedback
2016-02-24 15:41tillResolutionfixed => reopened
2016-03-04 10:08rhornigNote Added: 0001167
2016-03-04 10:08rhornigStatusfeedback => resolved
2016-03-04 10:08rhornigResolutionreopened => fixed
2016-03-04 12:02rhornigNote Deleted: 0001167
2016-03-04 12:05rhornigNote Added: 0001176
2016-03-04 12:05rhornigNote Edited: 0001176bug_revision_view_page.php?bugnote_id=1176#r12
2016-03-04 13:09tillNote Added: 0001177
2016-03-04 13:09tillStatusresolved => feedback
2016-03-04 13:09tillResolutionfixed => reopened
2017-02-01 16:42andrasNote Added: 0001301
2017-02-01 16:42andrasStatusfeedback => resolved
2017-02-01 16:42andrasFixed in Version5.0 => 5.1pre3
2017-02-01 16:42andrasResolutionreopened => fixed

Notes
(0001164)
rhornig   
2016-02-22 12:56   
Merged into master.
(0001165)
till   
2016-02-24 15:41   
Sorry for bringing that up again! Could you also add a "static" in front of that line?
(0001176)
rhornig   
2016-03-04 12:05   
Putting static there results in build errors. Why do you need it to be local to the compilation unit?

(0001177)
till   
2016-03-04 13:09   
Sorry, I had to reopen to answer:
clang gives a warning:
no previous extern declaration for non-static variable 'CFGID_EVENTLOG_TLOG_FILE' [-Wmissing-variable-declarations]

If you need that to be not static (I understand that, I had not thought about config options being shared by several modules) we can keep it like that and I have to add extern omnetpp::cConfigOption * in my header files (what is fine I think). The cleaner solution would probably be to not share the Options by using externs, but by retrieving them using their ID for example. I guess that is a change that requires a bit too much effort right now?
(0001301)
andras   
2017-02-01 16:42   
Original issue "Namespace missing" has been fixed, please open another ticket(s) if there are additional issues.