[Paraview] compilation error

Rakesh Hammond rakesh.hammond at googlemail.com
Sun Nov 2 14:37:47 EST 2008


Hmm, sounds far too complicated !

Would it be a crime just to extend from a VTK class instead but not make any
use of the methods within the superclass?

I was wondering if I could do something similar to the example shown on the
wiki
http://paraview.org/Wiki/Plugin_Examples

That aside, what is the meaning of VTK_EXPORT in the definition below?

class VTK_EXPORT vtkMyFancyReader : public vtkMultiBlockDataSetAlgorithm

I also see VTK_FILTERING_EXPORT

Thanks,
Rakesh
2008/11/2 Michael Jackson <mike.jackson at bluequartz.net>

> I use the technique of compiling my sources into paraview as I build
> ParaView so I do something like:
>
>
>  MESSAGE (STATUS "Compiling PVDislocation into Paraview 3.x")
>  #-- Invoke this Macro to add the sources to paraview and
>  #-- wrap them for the client server
>  PARAVIEW_INCLUDE_WRAPPED_SOURCES ("${PVDislocation_WRAPPED_SRCS}")
>
>  #-- Invoke this macro to include non-wrapped sources in the build
>  PARAVIEW_INCLUDE_SOURCES("${PVDislocation_SRCS}")
>  # -- Add the Server Manager XML
>  # Place the package configuration file into the build tree.
>
>  CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_Filters_GUI.xml
>                 ${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}_Filters.xml @ONLY
> IMMEDIATE)
>
>  CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_GUI.xml
>                 ${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.xml @ONLY IMMEDIATE)
>
>  # Place the package configuration file into the build tree.
>  CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_PVSM.xml
>                 ${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.pvsm @ONLY IMMEDIATE)
>
>  # -- Add the Server Manager XML
>
>  PARAVIEW_INCLUDE_SERVERMANAGER_RESOURCES(${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.pvsm)
>  # -- Add the Client side xml
>
>  PARAVIEW_INCLUDE_GUI_RESOURCES("${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.xml")
>
>  PARAVIEW_INCLUDE_GUI_RESOURCES("${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}_Filters.xml")
>
> So you need something similar in your CMakeLists.txt file
>
> Mike
>
>
> On Nov 2, 2008, at 9:54 AM, Rakesh Hammond wrote:
>
>  Thanks - that was one of them annoying errors !
>>
>> I would like vtkMyFancyReader to create an instance of another class, say
>> myReader.h which doesn't extend from a vtkClass - how would I create this
>> class?
>>
>> Can i add myReader.cxx as SOURCE in the CMake below?
>>
>> ADD_PARAVIEW_PLUGIN(MyFancyReader "1.0"
>>             SERVER_MANAGER_XML readers.xml
>>             SERVER_MANAGER_SOURCES vtkMyFancyReader.cxx
>>             SOURCES vtkReader.cxx
>>               GUI_RESOURCES pqReader.qrc
>>               )
>>
>> This compiles, but is this the write way to go?  My confusion is that,
>> myReader.h also need reside on the server ( i assume?), but I don't think I
>> need to extend it from a vtkClass as I don't any functionalities from it -
>>
>> What I do need is be able to do the following in vtkMyFancyReader.cxx
>>
>> myReader reader = new myReader();
>> reader.doSomething();
>>
>> what is the correct way to go about it?
>>
>> Thanks,
>> Rakesh
>> 2008/11/2 Berk Geveci <berk.geveci at kitware.com>
>> I believe the wrapper code that generates the ClientServer bindings
>> requires that your class name start with vtk. Try changing it to
>> vtkMyFancyReader.
>>
>> -berk
>>
>> On Sat, Nov 1, 2008 at 5:34 PM, Rakesh Hammond
>> <rakesh.hammond at googlemail.com> wrote:
>> > Dear all,
>> >
>> > I am trying to write my first plugin reader and trying to follow the
>> > examples on the wiki.
>> > I am stuck with annoying syntax error, which I can't seem to understand
>> > where its coming from - can some one tell me where I am going wrong
>> please?
>> >
>> > Here is my top bit of the header file, where the error is being
>> generated
>> >
>> > class VTK_EXPORT myFancyReader : public vtMultiBlockDataSetAlgorithm {
>> >     public:
>> >         static myFancyReader* New();
>> > };
>> > #endif
>> >
>> > apparently there is a syntax error at the line where it begins with
>> class -
>> > when its trying to generate myFancyReaderClientServer.cxx
>> >
>> > My CMakeLists.txt is
>> >     ADD_PARAVIEW_PLUGIN(MyReader "1.0"
>> >                SERVER_MANAGER_XML readers.xml
>> >                GUI_RESOURCES pqReader.qrc
>> >                SERVER_MANAGER_SOURCES myFancyReader.cxx
>> >                )
>> >
>> > Thanks very much,
>> > Rakesh
>> >
>>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20081102/fa150f3b/attachment.htm>


More information about the ParaView mailing list