[vtkusers] Module auto-initialization problem

David Thompson david.thompson at kitware.com
Wed Aug 29 11:15:01 EDT 2012


Hi Marcus and Dave,

>> I'm trying to use vtkMathText in an application ... the auto-init function ... is not being called, unlike the corresponding auto-init for vtkRenderingOpenGL.
>> 
>> Is there something else I need to do beyond linking? ...
> 
> It would be useful to see the verbose compiler invocation with the
> defines CMake is passing through - that is where we would should see
> the autoinit stuff working.

Ah. I was unaware defines were being passed on the command line for autoinit. The vtkRenderingMatplotlibCxxTests target has these flags:

    -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)" -DvtkRenderingMathText_AUTOINIT="1(vtkRenderingMatplotlib)"

while in the directory with ParaView's main app, there are no AUTOINIT defines passed to the compiler at all. I then ran

    find . -name "*.cmake" -exec grep -l AUTOINIT {} \;

in the build directory, and the only targets that matched were the client-server wrapping libraries:

./Wrapping/ClientServer/CMakeFiles/vtkInteractionStyleCS.dir/DependInfo.cmake
./Wrapping/ClientServer/CMakeFiles/vtkIOParallelExodusCS.dir/DependInfo.cmake
./Wrapping/ClientServer/CMakeFiles/vtkRenderingFreeTypeOpenGLCS.dir/DependInfo.cmake
./Wrapping/ClientServer/CMakeFiles/vtkRenderingOpenGLCS.dir/DependInfo.cmake
./Wrapping/ClientServer/CMakeFiles/vtkRenderingVolumeOpenGLCS.dir/DependInfo.cmake

which exactly match the list of object factories registered with the application. For some reason, VTK/Rendering/Matplotlib/CMakeFiles/vtkRenderingMatplotlib.cmake contains:

  set(vtkRenderingMatplotlib_EXCLUDE_FROM_WRAPPING 1)

which appears to prevent client-server wrapping and thus, in turn, auto-initialization of the object factory in the application. Is there a reason for this?

> I know David Lonie is working on this, perhaps he has already hit this issue? I can help debug the autoinit stuff if that doesn't seem to be working.


I bugged him about this before spamming the list, but perhaps he'll know about the matplotlib wrapping exclusion.

	Thanks,
	David


More information about the vtkusers mailing list