[Paraview-developers] Linking error - ParaView plugin not buildable
moder22 at hush.com
moder22 at hush.com
Mon Apr 14 10:15:41 EDT 2014
That should'nt be the problem ;-)Chris
On Montag, 14. April 2014 at 3:10 PM, "Utkarsh Ayachit" wrote: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, 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"
> 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, 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
>> #include
>>
>> vtkStandardNewMacro(vtkTestSource);
>> vtkCxxRevisionMacro(vtkTestSource, "$Revision$");
>>
>> vtkTestSource::vtkTestSource() { ... }
>> vtkTestSource::~vtkTestSource() { ... }
>> void vtkTestSource::PrintSelf(ostream& os, vtkIndent indent)
>> {
>> this->Superclass::PrintSelf(os,indent);
>> }
>>
>> ...
>>
>> TestPlugin.xml:
>>
>>
>>
>> > label="Test">
>> ...
>>
>> > name="OutputDataSetType"
>> command="SetOutputDataSetType"
>> number_of_elements="1"
>> default_values="0">
>>
>>
>>
>>
>>
>>
>> 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
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20140414/dbee2aab/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestPlugin.zip
Type: application/zip
Size: 4595 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20140414/dbee2aab/attachment-0001.zip>
More information about the Paraview-developers
mailing list