A friend of mine is attempting to build vtk from source with Java wrappers on win64, and encountered some pretty horrendous failures right out of the box. <div><br></div><div>Any ideas on what to fix here? For some reason, he's being blocked from posting on the list.</div>
<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; "><br><br><div class="gmail_quote"><div class="im" style="color: rgb(80, 0, 80); ">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Jonathan Morra</b> <span dir="ltr"><<a href="mailto:jonmorra@gmail.com" target="_blank" style="color: rgb(0, 0, 204); ">jonmorra@gmail.com</a>></span><br></div><div class="im" style="color: rgb(80, 0, 80); ">
Date: Wed, Sep 1, 2010 at 9:33 AM<br>Subject: VTK Compiling with errors<br>To: <a href="mailto:vtkusers@vtk.org" target="_blank" style="color: rgb(0, 0, 204); ">vtkusers@vtk.org</a><br><br><br></div><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 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 class="im" style="color: rgb(80, 0, 80); "><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></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 class="im" style="color: rgb(80, 0, 80); "><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></div><div><br></div></div>
</span></div></div></span></div>