title: Cannot convert ‘bool’ to ‘NEDElement*’
body: <p>During installation of Omnetpp ,in final step "make" ,I encountered an error which says </p>
  
  <pre><code>**`cannot convert ‘bool’ to ‘NEDElement`**  
   in return  np-&gt;getErrors()-&gt;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' failed
  make[2]: *** [/home/shivanshu/Desktop/FinalProject/omnetpp-4.2.2/out/gcc-release/src/nedxml/ned2.tab.o] Error 1
  make[2]: Leaving directory '/home/shivanshu/Desktop/FinalProject/omnetpp-4.2.2/src/nedxml'
  Makefile:96: recipe for target 'nedxml' failed
  make[1]: *** [nedxml] Error 2
  make[1]: Leaving directory '/home/shivanshu/Desktop/FinalProject/omnetpp-4.2.2'
  Makefile:19: recipe for target 'allmodes' failed
  make: *** [allmodes] Error 2
  </code></pre>
  
  <p>The corresponding function is as below in which sometimes it is returning the type NEDElement * type and sometimes it's returning bool.</p>
  
  <pre><code>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-&gt;getErrors()-&gt;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-&gt;setFilename(slashifyFilename(np-&gt;getFileName()).c_str());
      ps.nedfile-&gt;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-&gt;getSource()-&gt;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-&gt;setSourceRegion(region);
  
      // store file comment
      storeFileComment(ps.nedfile);
  
      ps.propertyscope.push(ps.nedfile);
  
      globalps = ps; // remember this for error recovery
  
      if (np-&gt;getStoreSourceFlag())
          storeSourceCode(ps.nedfile, np-&gt;getSource()-&gt;getFullTextPos());
  
      // parse
      try
      {
          yyparse();
      }
      catch (NEDException&amp; e)
      {
          yyerror((std::string("error during parsing: ")+e.what()).c_str());
          yy_delete_buffer(handle);
          return 0;
      }
  
      if (np-&gt;getErrors()-&gt;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;
  }
  </code></pre>
  
  <p>I searched it on internet but i found ,you should have a latest gcc version ,but already i have  gcc version 7.5.</p>
  
  <p>Please help.</p>