I met an error complaining: error: expected initializer before ‘:’ token
SO I went to check the code, it has some lines as below,
class VTK_IO_EXPORT vtkPFReader
:
public vtkMultiBlockDataSetAlgorithm
{blahblah...}
I want to know in defining class VTK_IO_EXPORT vtkPFReader, what does the first name VTK_IO_EXPORT mean? I found that if I delete the VTK_IO_EXPORT, then no error occurs, but some other error happens. What should I do? Thanks a lot
VTK_IO_EXPORTis a preprocessor macro. It is blank on all platforms other that Windows.On Windows,
VTK_IO_EXPORTis defined as__declspec( dllexport )or__declspec( dllimport ), both of which are non-standard Microsoft extensions.The fact that you’re getting the error, and that removing
VTK_IO_EXPORTfixes it, suggests that for some reason you haveWIN32defined even though you’re building on Linux. You need to figure out why this is happening.