[vtkusers] VTK and MinGW on Windows 7

Jim Peterson jimcp at cox.net
Fri Sep 24 07:30:47 EDT 2010


David Gobbi wrote:
> You can run the basic java cone test with "ctest -R Java".
>
> Did you remove the vtk${KIT} library prefixes because it was necessary
> in order to get it to compile?  I ask because if just changing the
> vtk${KIT}Java prefixes is enough, then that is an easy change for me
> to push, but if you need to remove the remove all the lib prefixes,
> then that is a bigger change than I would feel comfortable with.  I
> don't use VTK on mingw myself, so I'd have to leave a change like that
> to the experts.
>
>   David
>
>   

David,
I removed the vtk$(KIT) library prefix, because the last time I tried to 
find a way for this to work, After renaming libvtkCommonJava.dll to 
vtkCommonJava.dll. I got a secondary library load failure for 
vtkCommon.dll. So I concluded the external referenced dll's all needed 
to have the lib prefix removed. So I did make two changes for my first 
test.

The good news is the System.LoadLibrary() statements work from java. the 
problem is when I try to create my first vtk object I get:

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 
vtk.vtkPolyDataMapper.VTKInit()J
    at vtk.vtkPolyDataMapper.VTKInit(Native Method)
    at vtk.vtkObject.<init>(vtkObject.java:96)
    at vtk.vtkAlgorithm.<init>(vtkAlgorithm.java:765)
    at vtk.vtkAbstractMapper.<init>(vtkAbstractMapper.java:79)
    at vtk.vtkAbstractMapper3D.<init>(vtkAbstractMapper3D.java:46)
    at vtk.vtkMapper.<init>(vtkMapper.java:405)
    at vtk.vtkPolyDataMapper.<init>(vtkPolyDataMapper.java:119)
    at my.vtk.Avtk.<init>(Avtk.java:82)

The source statement at the time is:

    pm = new vtkPolyDataMapper();

This would appear to mean the export names are not a match.

I am willing to call this "Java wrappers not supported with MingW for 
now." I have a workaround at no additional expense using Visual Studio 
Express.

Thanks for your time and effort, If this is worth pursuing for anyone 
else, I will be glad to help. But I don't need to occupy valuable time 
for my purposes.


Thanks,
Jim



More information about the vtkusers mailing list