[Paraview] Building a ParaView plugin

John Haiducek jhaiduce at gmail.com
Tue Nov 9 16:27:41 EST 2010


Is there anyone who's familiar with CMake and can explain to me why the
generated makefiles can't find my vtk libraries?

On Mon, Nov 8, 2010 at 3:13 PM, John Haiducek <jhaiduce at gmail.com> wrote:

> Thanks for the tip, Utkarsh.
>
> Now I'm having some difficulty with CMake (I've not used CMake enough to
> get comfortable with it yet).
>
> My CMakeLists.txt is:
>
> cmake_minimum_required(VERSION 2.8)
>  FIND_PACKAGE(ParaView REQUIRED)
>  INCLUDE(${PARAVIEW_USE_FILE})
>
> ADD_PARAVIEW_PLUGIN(AddTetraLayer "1.0"
>   SERVER_MANAGER_XML vtkAddTetraLayer_SM.xml
>   SERVER_MANAGER_SOURCES vtkAddTetraLayer.cxx
>   GUI_RESOURCE_FILES vtkAddTetraLayer_GUI.xml)
>
>
> When I do a "generate" in ccmake, I get this:
>
>  CMake Warning at
> /usr/local/lib/paraview-3.8/CMake/ParaViewPlugins.cmake:986 (ADD_LIBRARY):
>    Cannot generate a safe runtime search path for target AddTetraLayer
> because
>    files in some directories may conflict with libraries in implicit
>    directories:
>
>      runtime library [libQtCore.so.4] in /usr/lib64 may be hidden by files
> in:
>        /usr/local/lib/paraview-3.8
>
>    Some of these libraries may not be found correctly.
>  Call Stack (most recent call first):
>    CMakeLists.txt:9 (ADD_PARAVIEW_PLUGIN)
>
>
> I am then able to build in spite of the error, but the output looks like:
>
> [  9%] Generating qrc_AddTetraLayer.cxx
> [ 18%] Generating vtkSMXML_AddTetraLayer.h
> /usr/local/bin/kwProcessXML: error while loading shared libraries:
> libvtkCommon.so.pv3.8: cannot open shared object file: No such file or
> directory
> make[2]: *** [vtkSMXML_AddTetraLayer.h] Error 127
> make[1]: *** [CMakeFiles/AddTetraLayer.dir/all] Error 2
> make: *** [all] Error 2
>
> Can anyone tell me how to fix these errors?
>
>
> On Mon, Nov 8, 2010 at 1:01 PM, Utkarsh Ayachit <
> utkarsh.ayachit at kitware.com> wrote:
>
>> You need to compile a plugin and load that, simply loading the XML
>> wouldn't do. Look at the example in
>> ${ParaViewSource}/Examples/Plugins/Filter to see how to write the
>> CMakeLists.txt to build such a plugin.
>>
>> Refer to the Wiki for additional details:
>> http://www.paraview.org/Wiki/Plugin_HowTo#Adding_a_new_VTK_filter
>>
>> Utkarsh
>>
>> On Mon, Nov 8, 2010 at 2:47 PM, John Haiducek <jhaiduce at gmail.com> wrote:
>> > I downloaded a new vtk class (vtkAddTetraLayer) from
>> > http://www.vision.ee.ethz.ch/~blloyd/Extrusion/<http://www.vision.ee.ethz.ch/%7Eblloyd/Extrusion/>.
>> I compiled the
>> > vtkAddTetraLayer.cxx to a shared library. I can then load the plugin
>> using
>> > the Server Manager XML file, but when I try to use it I get:
>> >
>> > ERROR: In
>> >
>> /home/haiduced/Downloads/ParaView-3.8.1/Servers/Common/vtkProcessModule.cxx,
>> > line 1065
>> > vtkProcessModule (0x861b60): Cannot create object of type
>> > "vtkAddTetraLayer".
>> > while processing
>> > Message 0 = New
>> >   Argument 0 = string_value {vtkAddTetraLayer}
>> >   Argument 1 = id_value {1068}
>> >
>> >
>> >
>> > ERROR: In
>> >
>> /home/haiduced/Downloads/ParaView-3.8.1/Servers/Common/vtkProcessModule.cxx,
>> > line 1066
>> > vtkProcessModule (0x861b60): Aborting execution for debugging purposes.
>> >
>> > So ParaView doesn't know about this vtk class. Is there a way to tell
>> > ParaView that the class is defined in the shared library
>> > vtkAddTetraLayer.so? Is there a way to access this new class from
>> ParaView
>> > without recompiling VTK and ParaView from scratch?
>> >
>> > John Haiducek
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the ParaView Wiki at:
>> > http://paraview.org/Wiki/ParaView
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.paraview.org/mailman/listinfo/paraview
>> >
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20101109/1a5301a7/attachment.htm>


More information about the ParaView mailing list