[Paraview] error building my code

Moreland, Kenneth kmorel at sandia.gov
Fri Jan 9 10:20:22 EST 2009

The error that you are getting is actually from the "client-server" wrapper that is generating the code to marshal and unmarshal function calls between ParaView client and server.  I agree that the problem is most likely caused by the use of STL classes.  The parser does not handle these, so you will have to wrap any portion of your header using STL with //BTX & //ETX flags.  That is, have a line "//BTX" at the start of the portion you want the wrapper to ignore and a line "//ETX at the end.

BTW, when including an STL header file, you should prefix the file with vtkstd.  That is, use "#include <vtkstd/vector>" and "#include <vtkstd/string>".  The VTK build creates these special include files to help make your STL use more portable.  Also, you should prefix all of the STL classes and functions with vtkstd:: rather than std:: (or use the vtkstd namespace in you cxx file).  Again, VTK creates the vtkstd namespace to be portable to STL implementations that do not use the std namespace correctly.


On 1/9/09 7:43 AM, "Paul Edwards" <paul.m.edwards at gmail.com> wrote:

One problem is you need the std:: prefix before string and vector.


2009/1/9 Natalie Happenhofer <nataliehapp at hotmail.com>
I encounter yet another problem which is, I believe, independent from the library-linking issue.
Trying to build my code (vtkVdcWriter.h and vtkVdcWriter.cxx) within paraview and expecting all the linker errors, I get the following error:

[99%] Generating vtkVdcWriterClientServer.cxx
syntax error
***SYNTAX ERROR found in parsing the header file C:/ParaviewSource/ParaView3/Plugins/vtkVdcWriter.h before line 49 ***

I believe it´s an error thrown by the Qt. Does anyone know what´s the problem here (the vtkVdcWriter.h file is posted below) or at least, how I can get an error message which is at least a bit more specific?

#ifndef _vtkVdcWriter_h
#define _vtkVdcWriter_h

#include "vtkProcessObject.h"
#include "vtkDataSet.h"
#include <vector>
#include <string>

class VTK_EXPORT vtkVdcWriter : public vtkProcessObject
  static vtkVdcWriter *New();
  void PrintSelf(ostream& os, vtkIndent indent);

  // Set or get the file name of the vdc file.
  virtual void SetFileName(const char* fname);
  virtual const char* GetFileName();

  // Set the input data set.
  virtual void SetInput(vtkDataSet* ds);

  // Description:
  // Get any input of this filter.
  vtkDataObject *GetInput(int idx);
  vtkDataObject *GetInput()
    {return this->GetInput( 0 );}

  // Write the XDMF file.
  void Write();

  //routines from vapor vdfcreate
 int cvtToOrder(const char *from, void *to);
 int cvtToExtents(const char *from, void *to);
 int cvtTo3DBool(const char *from, void *to);
 int getUserTimes(const char *path, vector <double> &timevec);

 int WriteVDF(unsigned int* dims, int numts, int level, string coordsystem, string metafilename, string var);


  char *FileNameString;
  char *MetaFileName;
  char *DataFileName;
#endif /* _vtkVdcWriter_h */

Could it be a problem using STL-classes here?

thx for any piece of advice,

¡Ingresa ahora a MSN! ¿Quieres saber cómo va a estar el clima mañana?  <http://tiempo.latam.msn.com/>

ParaView mailing list
ParaView at paraview.org

   ****      Kenneth Moreland
    ***      Sandia National Laboratories
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090109/cf5d9094/attachment.htm>

More information about the ParaView mailing list