[vtk-developers] Problems installing VTK

Sebastien Jourdain sebastien.jourdain at kitware.com
Sat Mar 21 18:04:23 EDT 2015


Try to load the libraries that you need to load instead of all of them. It
seems that you didn't build everything (which is probably fine).

Seb

On Sat, Mar 21, 2015 at 2:58 PM, CSharpdotcom . <csharpdotcom at gmail.com>
wrote:

> I already had PATH=C:\VTK\bin\Release, and added ;%PATH% at the end,
> but it still doesn't work, and get the following output:
>
> java.lang.UnsatisfiedLinkError:
> C:\VTK\bin\Release\vtkChartsCoreJava.dll: Can't find dependent
> libraries
>     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)    at
> java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
>     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
>     at java.lang.Runtime.loadLibrary0(Runtime.java:870)
>     at java.lang.System.loadLibrary(System.java:1119)
>     at vtk.vtkNativeLibrary.LoadLibrary(vtkNativeLibrary.java:214)
> at vtk.vtkNativeLibrary.LoadLibrary(vtkNativeLibrary.java:214)
>     at
> vtk.vtkNativeLibrary.LoadAllNativeLibraries(vtkNativeLibrary.java:149)
>     at
> vtk.sample.rendering.AwtConeRendering.<clinit>(AwtConeRendering.java:19)
> java.lang.UnsatisfiedLinkError:
> C:\VTK\bin\Release\vtkDomainsChemistryJava.dll: Can't find dependent
> libraries
>     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
>     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
>     at java.lang.Runtime.loadLibrary0(Runtime.java:870)
>     at java.lang.System.loadLibrary(System.java:1119)
>     at vtk.vtkNativeLibrary.LoadLibrary(vtkNativeLibrary.java:214)
>     at
> vtk.vtkNativeLibrary.LoadAllNativeLibraries(vtkNativeLibrary.java:149)
>     at
> vtk.sample.rendering.AwtConeRendering.<clinit>(AwtConeRendering.java:19)
> ...................
>
> These error messages continue, then a list of files not loaded are
> printed out, as given in the source code.
>
> Based on these error messages it's picking up the dll files in the
> \Release folder, but it's unable to find other files that these dll
> files depend on.
>
> Do you want a full listing of the Java source file?  The
> AwtConeRendering class starts off with:
>
>   static {
>     System.out.println(System.getProperty("java.library.path"));
>     if (!vtkNativeLibrary.LoadAllNativeLibraries()) {
>       for (vtkNativeLibrary lib : vtkNativeLibrary.values()) {
>         if (!lib.IsLoaded()) {
>           System.out.println(lib.GetLibraryName() + " not loaded");
>         }
>       }
>     }
>     vtkNativeLibrary.DisableOutputWindow(null);
>   }
>
> which is followed by the main() method, which contains statements such as:
>
> vtkConeSource cone = new vtkConeSource();
>
> csharp
>
> On Sat, Mar 21, 2015 at 10:26 AM, Sebastien Jourdain
> <sebastien.jourdain at kitware.com> wrote:
> > Te java.library.path is not enough and you need to add into your
> environment
> > PATH the following directory, C:\VTK\bin\Release.
> >
> > set PATH=C:\VTK\bin\Release;%PATH%
> >
> > Seb
> >
> > On Sat, Mar 21, 2015 at 10:33 AM, CSharpdotcom . <csharpdotcom at gmail.com
> >
> > wrote:
> >>
> >> Hello,
> >>
> >> I'm new to VTK and this is my first posting here or on any other forum
> >> related to VTK.
> >>
> >> I've been trying for about a week to get VTK installed and running on
> >> my computer.  The project I'm working on is to use Java with VTK to
> >> represent 3D graphics, which I hope to use with NetBeans 8.0.2.  I
> >> also have Visual Studio Pro 2010.
> >>
> >> After failed attempts in installing VTK  6.2.0 and the latest version
> >> of CMake, from the link
> >> http://www5.cs.fau.de/en/conrad/tutorials/itk-and-vtk-wrapping/wrap-vtk
> >> I downloaded and unzipped VTK 6.1.0 and CMake 3.0.0, then installed
> >> them.
> >>
> >> I then ran CMake according to the instructions on that link and
> >> installed the generated code in the folder C:\VTK.  I then clicked on
> >> the file VTK.sin in that folder, which opened up Visual Studio and
> >> started compiling the code with a large number of modules in the
> >> project.  This took about an hour, and on completion, generated the
> >> line at the end:
> >>
> >> Build: 387 succeeded, 1 failed, 0 up-to-date, 0 skipped
> >>
> >> I saved this in a file, which is very long, and after some effort
> >> found the error message:
> >>
> >> 112>C:\VTK\bin\Release\vtkRenderingCoreJava.dll : fatal error LNK1120:
> >> 1 unresolved externals
> >>
> >> In the mean time I attempted to recompile the project, which was much
> >> quicker, and got the same message.  In  recompiled I checked the
> >> "INSTALL" option, which had not previously been checked, although I
> >> don't know if that is significant.
> >>
> >> Located in the folder \VTK\java\sample\rendering is the source file
> >> AwTConeRendering.java, which apparently has not been compiled.  I
> >> created a NetBeans project and copied that file into it, then linked
> >> vtk.jar in the folder \VTK\bin to the project, and all imports were
> >> satisfied.  In setting the Windows path to point to the dll files in
> >> \VTK\bin\Release, the application appears to pick up the dll files
> >> correctly, however, I get the following error message:
> >>
> >> java.lang.UnsatisfiedLinkError:
> >> C:\VTK\bin\Release\vtkChartsCoreJava.dll: Can't find dependent
> >> libraries
> >>
> >> repeated for many dll files.  Incidentally, as Visual Studio dlls are
> >> all 32 bits, as far as I know, I set up NetBeans to use a 32 bit JVM.
> >> This had previously been tested successfully with a test dll I created
> >> with Visual Studio and could execute with NetBeans.
> >>
> >> This problem is presumably related to the first error mentioned above,
> >> and would be most grateful in getting this issue resolved.  As I said,
> >> I'm new to VTK, and in fact only in the last couple of weeks have
> >> tried for the first time to call a dll file from a Java application on
> >> a Windows computer.
> >>
> >> In the Java code I added the statement:
> >>
> >> System.out.println(System.getProperty("java.library.path"));
> >>
> >> to check that the path was correct, which is the case.
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Search the list archives at:
> http://markmail.org/search/?q=vtk-developers
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://public.kitware.com/mailman/listinfo/vtk-developers
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150321/fba5e64e/attachment-0001.html>


More information about the vtk-developers mailing list