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

moder22 at hush.com moder22 at hush.com
Fri Apr 11 07:49:14 EDT 2014


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:   
...
 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  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20140411/aa52351a/attachment.html>


More information about the Paraview-developers mailing list