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

Mathieu Malaterre mathieu.malaterre at kitware.com
Fri Nov 19 18:18:25 EST 2004


Michael,

	Put the object in between

//BTX
std::string filename
//ETX

	The python/tcl wrapper can only deals with (some) pointers.

HTH
Mathieu

Michael Froh wrote:
> 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 
> 






More information about the vtkusers mailing list