[vtkusers] message from a friend of mine
Jonathan Morra
jonmorra at gmail.com
Thu Sep 2 01:39:00 EDT 2010
Thanks for the response, I guess I'll try compiling everything under 32 bit
Visual Studios and see how that goes. Should I turn on/off any other CMake
flags?
On Wed, Sep 1, 2010 at 6:17 PM, Jim Peterson <jimcp at cox.net> wrote:
> Mark Roden wrote:
>
>> 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.
>> Any ideas on what to fix here? For some reason, he's being blocked from
>> posting on the list.
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: *Jonathan Morra* <jonmorra at gmail.com <mailto:jonmorra at gmail.com>>
>> Date: Wed, Sep 1, 2010 at 9:33 AM
>> Subject: VTK Compiling with errors
>> To: vtkusers at vtk.org <mailto:vtkusers at vtk.org>
>>
>>
>> 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:
>>
>> BUILD_SHARED_LIBS
>> VTK_USE_N_WAY_ARRAYS
>> VTK_USE_RENDERING
>> VTK_WRAP_JAVA
>> I set all other flags off, also I changed the CMAKE_INSTALL_PREFIX to a
>> directory in My Documents.
>>
>> 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
>>
>> import vtk.vtkSphereSource;
>> import vtk.vtkPolyDataMapper;
>> import vtk.vtkActor;
>> import vtk.vtkRenderer;
>> import vtk.vtkRenderWindow;
>> import vtk.vtkRenderWindowInteractor;
>>
>> /**
>> *
>> * @author jmorra
>> */
>> public class Application {
>>
>> static {
>> System.loadLibrary("vtkCommonJava");
>> System.loadLibrary("vtkFilteringJava");
>> System.loadLibrary("vtkIOJava");
>> System.loadLibrary("vtkImagingJava");
>> System.loadLibrary("vtkGraphicsJava");
>> System.loadLibrary("vtkRenderingJava.");
>> }
>>
>> public static void main(String[] args) {
>> // create sphere geometry
>> vtkSphereSource sphere = new vtkSphereSource();
>> }
>> }
>>
>> The program threw the following exception on the first System.loadLibrary
>> call
>>
>> java.lang.UnsatisfiedLinkError:
>> C:\Users\jmorra\Documents\vtk-binaries\bin\Release\vtkCommonJava.dll: Can't
>> find dependent libraries
>>
>> 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.
>>
>> Please let me know what I'm doing wrong or if this is a VTK error.
>>
>> Thanks,
>> Jon
>>
>> ------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> 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 VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
> I built and used vtk 5.6.0 on 32bit windows with shared libraries and Java
> wrappers using Visual Studio 2008. taking a quick look at the vtk Java
> wrappers, I am not sure the mechanism for dereferencing object pointers
> between the java wrappers and the shared libraries is 64bit capable, the
> Java wrappers appear to pass a long as a vtk object pointer. The specific
> error actually looks like the vtk java wrapper dll was found, but the
> corresponding vtk shared libraries are not in the library path.
>
> Hope that helps,
>
> Jim
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100901/2d6cc8aa/attachment.htm>
More information about the vtkusers
mailing list