During installation of Omnetpp ,in final step "make" ,I encountered an error which says
**`cannot convert ‘bool’ to ‘NEDElement`** in return np->getErrors()->addError("", "unable to allocate work memory"); return false;}Makefile:51: recipe for target '/home/shivanshu/Desktop/FinalProject/omnetpp-4.2.2/out/gcc-release/src/nedxml/ned2.tab.o' failedmake[2]: *** [/home/shivanshu/Desktop/FinalProject/omnetpp-4.2.2/out/gcc-release/src/nedxml/ned2.tab.o] Error 1make[2]: Leaving directory '/home/shivanshu/Desktop/FinalProject/omnetpp-4.2.2/src/nedxml'Makefile:96: recipe for target 'nedxml' failedmake[1]: *** [nedxml] Error 2make[1]: Leaving directory '/home/shivanshu/Desktop/FinalProject/omnetpp-4.2.2'Makefile:19: recipe for target 'allmodes' failedmake: *** [allmodes] Error 2
The corresponding function is as below in which sometimes it is returning the type NEDElement * type and sometimes it's returning bool.
NEDElement *doParseNED2(NEDParser *p, const char *nedtext){#if YYDEBUG != 0 /* #if added --VA */ yydebug = YYDEBUGGING_ON;#endif NONREENTRANT_NED_PARSER(p); // reset the lexer pos.co = 0; pos.li = 1; prevpos = pos; yyin = NULL; yyout = stderr; // not used anyway // alloc buffer struct yy_buffer_state *handle = yy_scan_string(nedtext); if (!handle) {np->getErrors()->addError("", "unable to allocate work memory"); return false;} // create parser state and NEDFileElement resetParserState(); ps.nedfile = new NedFileElement(); // store file name with slashes always, even on Windows -- neddoc relies on that ps.nedfile->setFilename(slashifyFilename(np->getFileName()).c_str()); ps.nedfile->setVersion("2"); // storing the start and end position of the whole file for the NedFileElement // NOTE: we cannot use storePos() because it strips off the leading spaces // and comments from the element. YYLTYPE pos = np->getSource()->getFullTextPos(); NEDSourceRegion region; region.startLine = pos.first_line; region.startColumn = pos.first_column; region.endLine = pos.last_line; region.endColumn = pos.last_column; ps.nedfile->setSourceRegion(region); // store file comment storeFileComment(ps.nedfile); ps.propertyscope.push(ps.nedfile); globalps = ps; // remember this for error recovery if (np->getStoreSourceFlag()) storeSourceCode(ps.nedfile, np->getSource()->getFullTextPos()); // parse try { yyparse(); } catch (NEDException& e) { yyerror((std::string("error during parsing: ")+e.what()).c_str()); yy_delete_buffer(handle); return 0; } if (np->getErrors()->empty()) { // more sanity checks if (ps.propertyscope.size()!=1 || ps.propertyscope.top()!=ps.nedfile) INTERNAL_ERROR0(NULL, "error during parsing: imbalanced propertyscope"); if (!ps.blockscope.empty() || !ps.typescope.empty()) INTERNAL_ERROR0(NULL, "error during parsing: imbalanced blockscope or typescope"); } yy_delete_buffer(handle); return ps.nedfile;}
I searched it on internet but i found ,you should have a latest gcc version ,but already i have gcc version 7.5.
Please help.