[vtkusers] vtkWrapPython parsing error (Syntax error parsing header file)

Michael Froh mfroh at swri.ca
Fri Nov 19 18:06:35 EST 2004


Hi,

I'm trying to build a simple piece of code linked against VTK-4.2,
wrapped with vtkWrapPython, using the VTK_WRAP_PYTHON2 CMake command.
Unfortunately, I'm getting a syntax error from my header file:

Building Custom
command /home/mfroh/dev/plugin_examples/AnalyzeReader/AnalyzeReaderPython.cxx...
syntax error
*** SYNTAX ERROR found in parsing the header
file /home/mfroh/dev/plugin_examples/AnalyzeReader/AnalyzeReader.h
before line 11***
make[1]: ***
[/home/mfroh/dev/plugin_examples/AnalyzeReader/AnalyzeReaderPython.cxx]
Error 1

I've tried stripping out any extraneous code that I can from the header
file, in order to isolate the parsing problem. The resulting header file
is as follows:

#ifndef __AnalyzeReader_h
#define __AnalyzeReader_h

#include "vtkImageData.h"
#include <string>

class AnalyzeReader                   
{
  private:
    std::string filename;       
  public:
    char *GetDescriptiveName();
    char *GetFileExtensions();
    void SetFilename(const char *);
    vtkImageData *GetOutput();
};

#endif

Since line 11 would be the "std::string filename;" line, I can't figure
out how the parser is getting confused prior to that. Is there any way
to get more verbose output from the parser to clarify where the problem
lies?

Thanks,
Michael 

-- 
Michael Froh 
Imaging Research, Sunnybrook & Women's College Health Sciences Centre




More information about the vtkusers mailing list