<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">I'm attempting to compile VTK from source with the Java wrappers on in 64bit Visual Studios 2008. I've downloaded version 5.6.0 and ran CMake with the following parameters:</span><div>
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div><br></div><div>BUILD_SHARED_LIBS</div><div>VTK_USE_N_WAY_ARRAYS</div><div>VTK_USE_RENDERING</div><div>
VTK_WRAP_JAVA</div><div>I set all other flags off, also I changed the CMAKE_INSTALL_PREFIX to a directory in My Documents.</div><div><br></div><div>The compilation did result in creating vtk.jar and some dlls, however 67 projects compiled successfully and 7 failed. I tried to make a very simple project in NetBeans 6.9.1 where I added the vtk.jar library and then set the java path with -Djava.library.path="path/to/vtk/dlls" and then had the following Java</div>
<div><br></div><div><div>import vtk.vtkSphereSource;</div><div>import vtk.vtkPolyDataMapper;</div><div>import vtk.vtkActor;</div><div>import vtk.vtkRenderer;</div><div>import vtk.vtkRenderWindow;</div><div>import vtk.vtkRenderWindowInteractor;</div>
<div><br></div><div>/**</div><div> *</div><div> * @author jmorra</div><div> */</div><div>public class Application {</div><div><br></div><div> static {</div><div> System.loadLibrary("vtkCommonJava");</div>
<div> System.loadLibrary("vtkFilteringJava");</div><div> System.loadLibrary("vtkIOJava");</div><div> System.loadLibrary("vtkImagingJava");</div><div> System.loadLibrary("vtkGraphicsJava");</div>
<div> System.loadLibrary("vtkRenderingJava.");</div><div> }</div><div><br></div><div> public static void main(String[] args) {</div><div> // create sphere geometry</div><div> vtkSphereSource sphere = new vtkSphereSource();</div>
<div> }</div><div>}</div><div><br></div><div>The program threw the following exception on the first System.loadLibrary call</div></div><div><br></div><div>java.lang.UnsatisfiedLinkError: C:\Users\jmorra\Documents\vtk-binaries\bin\Release\vtkCommonJava.dll: Can't find dependent libraries</div>
<div><br></div><div>I ran dependency walker on vtkCommonJava.dll and it didn't look like anything was missing. This leads me to assume the error is somewhere the projects that failed to compile under VS 2008.</div><div>
<br></div><div>Please let me know what I'm doing wrong or if this is a VTK error.</div><div><br></div><div>Thanks,</div><div>Jon</div></span><br></div>