[Paraview-developers] Linking error - ParaView plugin not buildable

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Apr 14 09:10:34 EDT 2014


Can you attach the complete source as a tarball/zip?  That'll make it
easier to just try it out.

On Mon, Apr 14, 2014 at 2:52 AM,  <moder22 at hush.com> wrote:
> Unfortunately not...
>
>
> int vtkTestSource::RequestInformation(vtkInformation *reqInfo,
> vtkInformationVector **inVector, vtkInformationVector *outVector)
> {
>
> if(this->vtkPolyDataAlgorithm::RequestInformation(reqInfo,inVector,outVector))
>   return 0;
>
>     vtkInformation *info = outVector->GetInformationObject(0);
>
>     double tRange[2] = {stepValues[0], stepValues[steps-1]};
>     info->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), tRange, 2);
>     info->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), stepValues,
> steps);
>     info->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),
> -1);
>
>     return 1;
> }
>
>
>
> int vtkTestSource::RequestData(vtkInformation *reqInfo, vtkInformationVector
> **inVector, vtkInformationVector *outVector)
> {
>     vtkInformation *outInfo = outVector->GetInformationObject(0);
>     vtkPolyData *output =
> vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
>
>     if (!output)
>         return 0;
>
>     double time = 0.0;
>     if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()))
>         time =
> outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
>
>     output->Initialize();
>     output->GetInformation()->Set(vtkDataObject::DATA_TIME_STEP(), time);
>     this->setPolyData(time, output);
>
>     return 1;
> }
>
> Any other ideas?
> Chris
>
>
> On Freitag, 11. April 2014 at 3:09 PM, "Utkarsh Ayachit"
> <utkarsh.ayachit at kitware.com> wrote:
>
> Try adding implementations for RequestInformation and RequestData in
> the testplugin.cpp file. Does that help?
>
> On Fri, Apr 11, 2014 at 7:49 AM, <moder22 at hush.com> wrote:
>> Hello,
>> I have tried to write my own source for ParaView using an plug-in. The
>> code
>> seems to be correct, the Compile works without errors, but the Linker
>> fails:
>> "TestSourceInit.obj : error LNK2019: unresolved external symbol "void
>> __cdecl testplugin_Init(class vtkClientServerInterpreter *)"
>> (?testplugin_Init@@YAXPAVvtkClientServerInterpreter@@@Z) referenced in
>> function _TestSource_Initialize"
>>
>> testplugin.h:
>>
>> #include ...
>> class VTK_EXPORT vtkTestSource : public vtkPolyDataAlgorithm
>> {
>> public:
>> vtkTypeRevisionMacro(vtkTestSource, vtkPolyDataAlgorithm);
>> static vtkTestSource* New();
>> void PrintSelf(ostream& os, vtkIndent indent);
>>
>> protected:
>> vtkTestSource();
>> ~vtkTestSource();
>> int RequestInformation(vtkInformation *reqInfo, vtkInformationVector
>> **inVector, vtkInformationVector *outVector);
>> int RequestData (vtkInformation *reqInfo, vtkInformationVector
>> **inVector, vtkInformationVector *outVector);
>> private:
>> vtkTestSource(const vtkTestSource&); // Not implemented.
>> void operator=(const vtkTestSource&); // Not implemented.
>> };
>>
>>
>> testplugin.cpp:
>>
>> #include "testplugin.h"
>> #include <vtkObjectFactory.h>
>> #include <vtkNew.h>
>>
>> vtkStandardNewMacro(vtkTestSource);
>> vtkCxxRevisionMacro(vtkTestSource, "$Revision$");
>>
>> vtkTestSource::vtkTestSource() { ... }
>> vtkTestSource::~vtkTestSource() { ... }
>> void vtkTestSource::PrintSelf(ostream& os, vtkIndent indent)
>> {
>> this->Superclass::PrintSelf(os,indent);
>> }
>>
>> ...
>>
>> TestPlugin.xml:
>>
>> <ServerManagerConfiguration>
>> <ProxyGroup name="sources">
>> <SourceProxy name="TestSource" class="vtkTestSource"
>> label="Test">
>> ...
>>
>> <IntVectorProperty
>> name="OutputDataSetType"
>> command="SetOutputDataSetType"
>> number_of_elements="1"
>> default_values="0">
>> <!-- value of 0 means vtkPolyData -->
>> </IntVectorProperty>
>> </SourceProxy>
>> </ProxyGroup>
>> </ServerManagerConfiguration>
>>
>> CMakeLists.txt:
>>
>> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
>> IF(NOT ParaView_BINARY_DIR)
>> FIND_PACKAGE(ParaView REQUIRED)
>> INCLUDE(${PARAVIEW_USE_FILE})
>> ENDIF(NOT ParaView_BINARY_DIR)
>>
>> INCLUDE(ParaViewPlugins)
>>
>> ADD_PARAVIEW_PLUGIN(TestSource "1.0"
>> SERVER_MANAGER_XML TestPlugin.xml
>> SERVER_MANAGER_SOURCES testplugin.cpp
>> REQUIRED_ON_SERVER)
>>
>> I seek for hours, but I can not find my own mistake... Where is the error?
>> Chris
>>
>>
>>
>> _______________________________________________
>> Paraview-developers mailing list
>> Paraview-developers at paraview.org
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>


More information about the Paraview-developers mailing list