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

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Apr 11 09:09:23 EDT 2014


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