Menu

Forward Declarations

Help
arya
2015-04-24
2015-05-01
  • arya

    arya - 2015-04-24

    Hi,

    my file has forward declarations like:
    typedef struct IO_FILE FILE;

    I keep getting an error when I try to parse the file with that line. Any way to get around it?

    Thank you

     
  • Jashua Cloutier

    Jashua Cloutier - 2015-04-24

    Please attach a .h file that demonstrates the issue

     
    • arya

      arya - 2015-04-24

      I'm trying to get the hang of CppHeaderParser before I start using it for a project. The files that I have to parse for the project has a lot of forward declarations. I get the following error when I try to parse the attached header file:

      Traceback (most recent call last):
      File "test.py", line 5, in <module>
      cppHeader = CppHeaderParser.CppHeader("C:\Final\namespacetest2.h")
      File "C:\Python27\lib\site-packages\CppHeaderParser\CppHeaderParser.py", line
      2333, in init
      % (self.headerFileName, tok.lineno, tok.value, " ".join(self.nameStack)))
      CppHeaderParser.CppHeaderParser.CppParseError: Not able to parse C:\Final\namespacetest2.h on line 3 evaluating ";"
      Error around: typedef struct _IO_FILE FILE

       
  • Jashua Cloutier

    Jashua Cloutier - 2015-04-24

    Are you using 2.5.1?

     
    • arya

      arya - 2015-04-24

      Yes I am

       
  • Jashua Cloutier

    Jashua Cloutier - 2015-04-27

    Please try 139:231618db8dee. You should see it works

     
  • arya

    arya - 2015-05-01

    Thank you :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.